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 UnionArray is_null #1632

Merged
merged 2 commits into from
May 2, 2022
Merged

Fix UnionArray is_null #1632

merged 2 commits into from
May 2, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented May 1, 2022

Which issue does this PR close?

Closes #1625.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label May 1, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1632 (3315175) into master (7d00e3c) will increase coverage by 0.00%.
The diff coverage is 89.28%.

❗ Current head 3315175 differs from pull request most recent head 7f03b63. Consider uploading reports for the commit 7f03b63 to get more accurate results

@@           Coverage Diff           @@
##           master    #1632   +/-   ##
=======================================
  Coverage   83.02%   83.03%           
=======================================
  Files         193      193           
  Lines       55577    55605   +28     
=======================================
+ Hits        46145    46169   +24     
- Misses       9432     9436    +4     
Impacted Files Coverage Δ
arrow/src/array/array_union.rs 90.63% <89.28%> (-0.09%) ⬇️
arrow/src/array/transform/mod.rs 86.57% <0.00%> (-0.23%) ⬇️
parquet_derive/src/parquet_field.rs 66.21% <0.00%> (ø)
parquet/src/encodings/encoding.rs 93.56% <0.00%> (+0.18%) ⬆️

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 7d00e3c...7f03b63. Read the comment docs.

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -304,6 +304,24 @@ impl Array for UnionArray {
fn data(&self) -> &ArrayData {
&self.data
}

Copy link
Contributor

@tustvold tustvold May 2, 2022

Choose a reason for hiding this comment

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

Just to check, these special cases aren't necessary for correctness, as the ArrayData lacks a validity buffer, but just clarity?

Copy link
Member Author

@viirya viirya May 2, 2022

Choose a reason for hiding this comment

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

I think so. For example, ArrayData.is_null returns false if its null_bitmap is None. These values are not changed before/after this change.

@tustvold tustvold merged commit 98a77fe into apache:master May 2, 2022
@viirya
Copy link
Member Author

viirya commented May 2, 2022

Thank you @tustvold !

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.

UnionArray::is_null incorrect
3 participants