Skip to content

parseJson implementation in VariantBuilder #3414

@gaurav7261

Description

@gaurav7261

Describe the enhancement requested

Every consumer of parquet-variant currently has to implement their own
JSON-to-Variant parsing (Spark, Kafka Connect, Flink, etc.). This adds
native parseJson() static methods to VariantBuilder using Jackson
streaming parser, ported from Apache Spark's production-proven logic.

  • Single-pass streaming (no intermediate JsonNode tree)
  • Smallest integer type selection (byte/short/int/long)
  • Decimal-first float handling, double fallback for scientific notation
  • Overloads for String input and pre-positioned JsonParser

https://github.com/apache/spark/tree/master/common/variant

Component(s)

Core

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions