Skip to content

Track and remove native Variant compatibility workarounds after upstream fixes #5477

Description

@peterxcli

What is the problem the feature request solves?

Native Variant projection in #5407 includes a few compatibility paths that exist because Comet currently uses Arrow/Parquet 58.4.0 or must interoperate with older Spark Variant encodings. These paths are intentionally narrow, but some perform row-by-row decoding or rebuilding and should not become permanent accidentally.

This issue records exactly which code is removable after an upstream fix ships, which upstream change owns it, and which nearby code is required Comet/Spark integration and must remain.

This is maintenance follow-up for #5407 under the Native Variant epic #5438. Spark UTF-16 output cleanup is tracked separately by #5474.

Arrow-rs workarounds

Describe the potential solution

For each checklist item:

  1. Wait for the relevant upstream behavior to merge and appear in a released dependency.
  2. Upgrade Arrow/Parquet through the normal dependency update.
  3. Delete only the mapped compatibility branch; do not duplicate the upstream implementation locally.
  4. Keep or adapt the existing regression tests to prove the upstream path works through Comet.
  5. Run the focused Rust Variant tests, Spark 4 Variant SQL tests, Spark 3 compilation boundary, formatting/lint, and git diff --check.

Definition of done:

  • Every temporary upstream workaround is either removed or explicitly retained with a current compatibility reason.
  • Dictionary and RunEndEncoded metadata, empty object keys, and the chosen unsigned-input policy remain covered.
  • Whole-value Variant projection still returns Spark's required [value, metadata] layout and preserves SQL NULL versus Variant JSON null.
  • No Spark/FFI integration code is removed merely because an Arrow-rs dependency was upgraded.

Additional context

The following nearby code is not covered by the Arrow-rs fixes above:

Current dependency: Arrow/Parquet 58.4.0.

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