Skip to content

[Variant] Enable direct top-level Variant projection in ordinary native Parquet scans #5551

Description

@peterxcli

Problem

After the schema, normalization, and physical-reader layers are ready, Comet still needs a deliberately narrow JVM admission path for direct top-level Variant projection and Spark-compatible behavior for missing columns and unsupported consumers.

Parent: #5546
Depends on: #5550

Solution

Tests

  • SELECT v and SELECT id, v, tail remain native and match Spark.
  • Objects, arrays, scalars, JSON null, SQL NULL, nullable parents, and entirely-null columns round-trip.
  • Spark sees logical VariantType with exact [value, metadata] Binary children.
  • A missing Variant column receives its existence default without shifting later defaults.
  • Unread Variant pruning from feat: Support native scans with unprojected Spark 4 VARIANT columns #5377 remains native.
  • Case-insensitive Unicode Variant projection remains native and matches Spark, covering a non-ASCII Variant root, an ordinary sibling beside Variant, and physical Kelvin sign matched to logical k. Preserve Spark's missing-column behavior for physical ſ read as logical s.
  • Unsupported consumers above have focused fallback assertions.
  • Spark 4.0/4.1 profiles pass and Spark 3.5 still compiles unchanged.

Completing this issue closes the ordinary-Parquet phase of #4295. Iceberg and the broader shredded optimization scope in #3983 remain separate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:scanParquet scan / data readingenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions