linhongyu510 opened a new pull request, #10970: URL: https://github.com/apache/arrow-rs/pull/10970
# Which issue does this PR close? - Closes #10951. # Rationale for this change For a struct with a non-zero parent offset, visible parent row `i` maps to child row `offset + 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? - Slice each struct child to the parent-visible window before validating non-nullable fields. - Add a regression test covering both the correctly masked and incorrectly unmasked cases. # Are these changes tested? Yes. TDD evidence on `main` at `c134baf8f`: - Before the production change, the focused regression failed because the correctly masked child null was rejected. - After the change, the focused regression passes. - `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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
