Skip to content

Support dictionary-encoded Variant value and typed_value inputs - #11071

Open
peterxcli wants to merge 3 commits into
apache:mainfrom
peterxcli:codex/variant-dictionary-inputs
Open

peterxcli wants to merge 3 commits into
apache:mainfrom
peterxcli:codex/variant-dictionary-inputs

Conversation

@peterxcli

@peterxcli peterxcli commented Sep 13, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #11068.

A Parquet reader may restore dictionary-encoded value or primitive typed_value fields from an embedded Arrow schema. VariantArray::try_new rejects these inputs, so downstream callers must decode them recursively before constructing a Variant array.

What changes are included in this PR?

Decode dictionary-encoded value and supported primitive typed_value inputs during Variant normalization, including nested shredding states. Keep the resulting storage canonical and attach UUID metadata after decoding UUID fields.

The Variant specification permits dictionary encoding for metadata; this change also accepts dictionary-encoded value and primitive typed_value inputs for compatibility, decoding them into canonical storage.

Are these changes tested?

Tests cover all dictionary key types, logical and parent nulls, slices, nested fallback values, extraction, and unshredding. Variant tests, formatting, and Clippy pass with Rust 1.98.1.

Are there any user-facing changes?

Both Variant array constructors accept these encoded inputs. Decoding may allocate; run-end-encoded values remain unsupported.

@github-actions github-actions Bot added the parquet-variant parquet-variant* crates label Sep 13, 2026
@peterxcli
peterxcli marked this pull request as ready for review September 15, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Variant] Support dictionary-encoded value and typed_value inputs

1 participant