-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Variant] Support Shredded Lists/Array in variant_get
#9049
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
base: main
Are you sure you want to change the base?
Conversation
scovich
left a comment
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.
I only had a few minutes to skim, and I couldn't tell quickly what was code movement vs. actual changes. Would there be a way to split them out into separate commits or something? Or at least describe clearly what moved vs. what changed?
The second commit in the stack was helpful that way, but the first commit still seemed to do an awful lot.
I am also happy to help review / quickly merge a PR that is just code movement |
136640a to
649cfcf
Compare
klion26
left a comment
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.
LGTM, Maybe we can create an issue to track the VariantPathElement::Index case.
| } | ||
|
|
||
| #[test] | ||
| fn test_variant_get_list_like_safe_cast() { |
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.
Do we need to add some cases for that with VariantPathElement::Field(We don't support VariantPathElement::Index in the current pr) or some perfectly shredded case
When trying to use shred_variant to generate some perfectly shredded cases, I found that the member variable value is not null for the return value of shred_variant. Is this the expected behavior? According to the parquet-vairant-spec
If the value is not an array, typed_value must be null. If the value is an array, value must be null.
Which issue does this PR close?
variant_get#8082.Rationale for this change
What changes are included in this PR?
ArrayVariantToArrowRowBuilderfromshred_varianttovariant_to_arrowso it can be shared withvariant_get.variant_to_arrowto clarify the hierarchy: start with the top-levelVariantToArrowRowBuilder, then second-level builders such asPrimitiveVariantToArrowRowBuilderandArrayVariantToArrowRowBuilder, etc.variant_getwith lists.Are these changes tested?
Yes
Are there any user-facing changes?
variant_getnow supports lists.