Skip to content

feat: support direct Variant projection in native Parquet scans - #5868

Open
peterxcli wants to merge 4 commits into
apache:mainfrom
peterxcli:feat/variant-direct-projection
Open

feat: support direct Variant projection in native Parquet scans#5868
peterxcli wants to merge 4 commits into
apache:mainfrom
peterxcli:feat/variant-direct-projection

Conversation

@peterxcli

@peterxcli peterxcli commented Sep 11, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #5551.
Closes #5546.

Rationale for this change

Complete the ordinary-Parquet admission step in #5546 so Spark can project whole Variant values through a native scan.

What changes are included in this PR?

Enable direct top-level Variant projection with allowReadingShredded=true and pushVariantIntoScan=false. Carry missing-column defaults as constant [value, metadata] structs while preserving their schema indexes, and retain Spark fallbacks for unsupported consumers and reader settings.

Reuse the Variant normalizer to handle Spark's empty object keys until Comet upgrades to an Arrow release containing apache/arrow-rs#10352. Document the supported surface and add removal TODOs for the compatibility paths, including #5477.

How are these changes tested?

Focused Spark 4.0/4.1 tests cover value parity, defaults, Unicode field matching, vector layout, and fallback behavior. Native Variant tests and clippy pass, and Spark 3.5 compiles. The new projection suite runs in Linux and macOS CI.

@github-actions github-actions Bot added enhancement New feature or request area:scan Parquet scan / data reading labels Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scan Parquet scan / data reading enhancement New feature or request

Projects

None yet

1 participant