fix(arrow-data): align struct null validation with parent offset - #10970
Open
linhongyu510 wants to merge 1 commit into
Open
fix(arrow-data): align struct null validation with parent offset#10970linhongyu510 wants to merge 1 commit into
linhongyu510 wants to merge 1 commit into
Conversation
linhongyu510
marked this pull request as ready for review
September 3, 2026 06:49
Jefffrey
reviewed
Sep 3, 2026
Comment on lines
+1547
to
+1548
| let child = child.slice(self.offset, self.len); | ||
| self.validate_non_nullable(self.nulls(), &child)? |
Contributor
There was a problem hiding this comment.
i feel we can modify validate_non_nullable to take in the child nulls, which we can slice here, instead of slicing the entire child which clones it
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?
Rationale for this change
For a struct with a non-zero parent offset, visible parent row
imaps to child rowoffset + i. Nullability validation compared the visible parent null buffer against the unsliced child null buffer, so it could reject masked child nulls and accept visible child nulls.What changes are included in this PR?
Are these changes tested?
Yes. TDD evidence on
mainatc134baf8f:cargo test -p arrow-data --lib: 56 passed.cargo fmt --all -- --check: passed.cargo clippy -p arrow-data --all-targets -- -D warnings: passed.git diff --check: passed.Are there any user-facing changes?
Yes. Validation now correctly accepts child nulls masked by a sliced struct parent and rejects child nulls visible through a non-null parent row. There are no API changes.
AI assistance
I used AI assistance to investigate the validation path, implement the focused test and fix, and prepare this description. I reviewed the complete diff and verified the behavior with the commands above.