[Variant] Take top-level nulls into consideration when extracting perfectly shredded children#9702
Open
AdamGS wants to merge 2 commits intoapache:mainfrom
Open
[Variant] Take top-level nulls into consideration when extracting perfectly shredded children#9702AdamGS wants to merge 2 commits intoapache:mainfrom
AdamGS wants to merge 2 commits intoapache:mainfrom
Conversation
9397795 to
9792bd9
Compare
scovich
approved these changes
Apr 13, 2026
Contributor
scovich
left a comment
There was a problem hiding this comment.
LGTM, thanks for the find+fix!
scovich
reviewed
Apr 13, 2026
| make_array(data) | ||
| }; | ||
|
|
||
| return Some(target_array.clone()); |
Contributor
There was a problem hiding this comment.
I don't think we need the clone any more?
Contributor
Author
There was a problem hiding this comment.
100% right, IDK when clippy catches these and when it doesn't
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?
typed_valueis extracted #9701Rationale for this change
Fixes a correctness issue, where top-level nullability will be dropped in these cases.
Its important to note that due to the current canonicalization behavior, some types (like
Binary) actually do behave correctly, this will be fully addressed in #9610 where we can support more underlying types, which simplifies it significantly.What changes are included in this PR?
Union the nullability buffers of perfectly shredded variant children with the array's top-level nullability.
Are these changes tested?
In addition to existing tests, add tests that verify that the nulls are applied, both when the child is has no-nulls and when it does.
Are there any user-facing changes?
Fixes incorrect behavior