Skip to content
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

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Oct 6, 2021

Which issue does this PR close?

Closes #815

Rationale for this change

The null count of the output of cast is incorrect for ListArrays

What changes are included in this PR?

Fix null calculation

Are there any user-facing changes?

Bug fixed

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 6, 2021
.null_bitmap()
.clone()
.map(|bitmap| bitmap.bits),
Some(data.null_count()),
Copy link
Contributor Author

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)

Copy link
Contributor Author

@alamb alamb Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov-commenter
Copy link

Codecov Report

Merging #816 (317d50a) into master (b9384f1) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 317d50a differs from pull request most recent head fe2c1f3. Consider uploading reports for the commit fe2c1f3 to get more accurate results
Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
arrow/src/compute/kernels/cast.rs 94.60% <100.00%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9384f1...fe2c1f3. Read the comment docs.

Copy link
Contributor

@nevi-me nevi-me left a 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

@nevi-me nevi-me merged commit a835f2c into apache:master Oct 7, 2021
@alamb alamb deleted the alamb/cast_list branch October 7, 2021 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect null count for cast kernel for list arrays
3 participants