Repository navigation
[Variant] Move VariantType into arrow-schema canonical extensions - #12033
Merged
Merged
Conversation
Member
Author
alamb
approved these changes
Nov 2, 2026
| /// The extension type for Parquet Variant. | ||
| /// | ||
| /// <https://arrow.apache.org/docs/format/CanonicalExtensions.html#parquet-variant> | ||
| Variant(VariantType), |
Contributor
There was a problem hiding this comment.
since this is marked as #[non_exhaustive] this is not a breaking API change
Member
Author
|
Thank you @alamb 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Follow-up to #12005; relates to #11952.
Rationale for this change
Schema-only consumers still need
parquet-variantto useVariantType, andField::try_canonical_extension_typedoes not recognizearrow.parquet.variant. Hosting the descriptor alongside the other canonical extensions lets these consumers usearrow-schemadirectly.What changes are included in this PR?
Move
VariantTypeintoarrow-schema's canonical extensions and registerCanonicalExtensionType::Variant. Re-export the same type fromparquet-variant, preserving the existing compute and Parquet import paths. Metadata handling and storage validation are unchanged; #11938 remains separate.Are these changes tested?
The moved unit test retains the existing storage-type checks and now verifies canonical extension lookup. Existing Variant compute doctests and Parquet Variant tests exercise the retained import paths.
Are there any significant user-facing changes?
Existing imports remain compatible. Direct
arrow-schemausers need itscanonical_extension_typesfeature.parquet-variantnow enables that feature to retain its unconditional re-export, which also enablesserde_coreandserde_jsondependencies inarrow-schema.Implementation and test changes prepared with Codex.