-
Notifications
You must be signed in to change notification settings - Fork 902
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
Superimpose null masks for STRUCT columns. #9144
Superimpose null masks for STRUCT columns. #9144
Conversation
Per rapidsai#5700, when a STRUCT column is constructed, the null mask of the parent column is bitwise-ANDed with that of all its children, such that a null row in the parent column corresponds to nulls in all its children. This is done recursively, allowing grand-child columns to also have nulls at the same row positions. `superimpose_parent_nulls()` makes this functionality available for columns that might not have been constructed through `make_struct_column()`, e.g. with columns received directly from Arrow. It does not require that the `column_view` is modifiable. For a STRUCT `column_view` argument, a new equivalent instance is created, with all its children's null masks modified to account for the parent nulls. `superimpose_parent_nulls()` can be used for all code that assumes that the child null masks account for the nulls in the parents (and grandparents, ad infinitum).
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #9144 +/- ##
===============================================
Coverage ? 10.82%
===============================================
Files ? 115
Lines ? 19122
Branches ? 0
===============================================
Hits ? 2070
Misses ? 17052
Partials ? 0 Continue to review full report at Codecov.
|
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.
👍
@gpucibot merge |
Per #5700, when a STRUCT column is constructed, the null mask of the parent
column is bitwise-ANDed with that of all its children, such that a null row
in the parent column corresponds to nulls in all its children. This is done
recursively, allowing grand-child columns to also have nulls at the same
row positions.
superimpose_parent_nulls()
makes this functionality available for columnsthat might not have been constructed through
make_struct_column()
, e.g.with columns received directly from Arrow. It does not require that the
column_view
is modifiable. For a STRUCTcolumn_view
argument, a newequivalent instance is created, with all its children's null masks modified
to account for the parent nulls.
superimpose_parent_nulls()
can be used for all code that assumes that thechild null masks account for the nulls in the parents (and grandparents,
ad infinitum).