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 incorrect into_buffers for UnionArray #1567

Merged
merged 5 commits into from
Apr 14, 2022
Merged

Conversation

viirya
Copy link
Member

@viirya viirya commented Apr 14, 2022

Which issue does this PR close?

Closes #1547.

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 Apr 14, 2022
@viirya viirya changed the title Fix incorrect buffers for UnionArray Fix incorrect into_buffers for UnionArray Apr 14, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2022

Codecov Report

Merging #1567 (17b7cea) into master (d701939) will increase coverage by 0.00%.
The diff coverage is 93.33%.

@@           Coverage Diff           @@
##           master    #1567   +/-   ##
=======================================
  Coverage   82.86%   82.86%           
=======================================
  Files         190      190           
  Lines       55042    55055   +13     
=======================================
+ Hits        45608    45621   +13     
  Misses       9434     9434           
Impacted Files Coverage Δ
arrow/src/array/data.rs 83.38% <93.33%> (+0.26%) ⬆️
arrow/src/datatypes/field.rs 53.79% <0.00%> (-0.31%) ⬇️

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 d701939...17b7cea. 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.

I appreciate #1546 will add some test coverage, but I think a simple explicit test couldn't hurt

@viirya
Copy link
Member Author

viirya commented Apr 14, 2022

Thanks @tustvold . Okay, I will add a test for this.

Comment on lines 2606 to 2609
let data_types = vec![
DataType::Union(vec![], UnionMode::Sparse),
DataType::Union(vec![], UnionMode::Sparse),
];
Copy link
Member Author

Choose a reason for hiding this comment

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

We can add more datatypes if needed.

@@ -1692,9 +1692,6 @@ mod tests {
}

#[test]
// Fails when validation enabled
// https://github.com/apache/arrow-rs/issues/1547
#[cfg(not(feature = "force_validate"))]
fn test_filter_union_array_sparse() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Re-enabled them here. cc @alamb

Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ so nice -- thank you @viirya

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.

Event better now 😃

@tustvold tustvold merged commit 0192872 into apache:master Apr 14, 2022
@viirya
Copy link
Member Author

viirya commented Apr 14, 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.

filter produces invalid sparse UnionArrays
4 participants