-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Variant] Add variant_get access as Variant
#9681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1bc7431
Add `variant_get` access as `Variant`
sdf-jkl 921b45a
Merge branch 'main' of https://github.com/apache/arrow-rs into varian…
sdf-jkl 5bf8206
use `has_valid_extension_type`
sdf-jkl 2da7f8c
fix MSRV
sdf-jkl 0849553
Merge branch 'main' of https://github.com/apache/arrow-rs into varian…
sdf-jkl 755b3fd
Apply suggestion from @scovich
sdf-jkl 406d84c
Add reasoning for propagating metadata column
sdf-jkl 26bfe3a
Merge branch 'main' of https://github.com/apache/arrow-rs into varian…
sdf-jkl fcdcd8f
Apply suggestions from code review
sdf-jkl 0277d91
fix
sdf-jkl cf7e545
only unshred if as_type Variant Field is not shredded + nit
sdf-jkl b6fa38a
Merge branch 'main' of https://github.com/apache/arrow-rs into varian…
sdf-jkl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helper just became a lot more complicated, could use some inline code comments explaining how this new
requested_variantstuff impacts the control flow?e.g. "if the caller requested variant, unshred to binary it before continuing; if they also provided a path to traverse, don't pass a type so that the requested field can be fetched directly."
But that opens a bunch of questions:
path? Wouldn't it be better to any shredding as deeply as possible first? Or did the caller ofshred_basic_variantalready do that?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variant_get: access asSome(DataType::Struct)(nested shredding) #8153.I could do 2 but I'm not sure about
variant_getcustom shredding.I checked Spark/duckdb/dremio
variant_getimplementations and it seems like no one does output shredding as a part ofvariant_getwhich is basically:There's a https://github.com/datafusion-contrib/datafusion-variant
Variantintegration and it strives for parity with spark/databricks.Custom shredding will, however, skip unshred-reshred round trip that'd come from doing:
That's really a #8153 discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair! So we should just check for and block
typed_valuein the variant schema, to avoid any confusion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here cf7e545. Sorry, should've split the comments/change/nit into separate commits