Repository navigation
Conversation
|
|
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.
Rationale for this change
drop_nullchecks physical null counts and validity bitmaps, which miss the logical nulls in dense and sparse unions. As a result, it can retain null values or rows across Array, ChunkedArray, RecordBatch and Table inputs.This addresses the union portion of #43851. REE selection support remains outside this patch; it does not resolve the whole issue.
What changes are included in this PR?
Use logical null counts and
is_validmasks for unions across the four input kinds. Keep the existing physical-bitmap paths for other types, including dictionary arrays. AMayHaveLogicalNullscheck avoids scanning union values when their children cannot contain nulls.Regressions cover dense/sparse unions, non-default type codes, slices, empty/all-null inputs, chunk boundaries, and row filtering with both union and ordinary columns.
Are these changes tested?
Windows x64, MSVC 19.44, Release, static Arrow/GTest 1.18.0 test linkage:
arrow-compute-vector-selection-test: 170 passed, one pre-existing disabled test. This includes the three union regressions.clang-format18.1.8 andgit diff --check: pass.The original behavior was also reproduced with PyArrow 26.0.0, using explicit validity filtering and Python row selection as controls. The patched validation above is the native C++ suite.
Are there any user-facing changes?
Logical union nulls are now removed, including the corresponding full rows in RecordBatch/Table inputs.
This PR contains a "Critical Fix" under the incorrect-data criterion:
drop_nullpreviously returned rows/values that should have been removed. There are no public API signature changes.Was AI used for this PR?
Codex generated the implementation and regression tests, performed code review, and ran the local validation described above.
PR code and description written by:
Reviewed before submission by: