-
Notifications
You must be signed in to change notification settings - Fork 794
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
Fix null count when casting ListArray #816
Conversation
.null_bitmap() | ||
.clone() | ||
.map(|bitmap| bitmap.bits), | ||
Some(data.null_count()), |
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.
this is the fix (should use the null count from the original array rather than the values)
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.
This is also consistent with arrow2: https://github.com/jorgecarleitao/arrow2/blob/a15044a1bc0c079c40520ad5e91b240998b3ee0a/src/compute/cast/mod.rs#L282
Codecov Report
@@ Coverage Diff @@
## master #816 +/- ##
==========================================
- Coverage 82.54% 82.54% -0.01%
==========================================
Files 168 168
Lines 47919 47910 -9
==========================================
- Hits 39555 39546 -9
Misses 8364 8364
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.
LGTM, the change makes sense. Thanks @alamb
Which issue does this PR close?
Closes #815
Rationale for this change
The null count of the output of
cast
is incorrect for ListArraysWhat changes are included in this PR?
Fix null calculation
Are there any user-facing changes?
Bug fixed