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

Read and skip validity buffer of UnionType Array for V4 ipc message #1789

Merged
merged 3 commits into from Jun 5, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented Jun 4, 2022

Which issue does this PR close?

Closes #1788.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@viirya viirya changed the title Read valididy buffer for V4 ipc message Read validity buffer for V4 ipc message Jun 4, 2022
@github-actions github-actions bot added arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels Jun 4, 2022
@viirya viirya changed the title Read validity buffer for V4 ipc message Read and skip validity buffer of UnionType Array for V4 ipc message Jun 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2022

Codecov Report

Merging #1789 (ea61242) into master (940b5b5) will decrease coverage by 0.00%.
The diff coverage is 78.94%.

@@            Coverage Diff             @@
##           master    #1789      +/-   ##
==========================================
- Coverage   83.39%   83.39%   -0.01%     
==========================================
  Files         198      198              
  Lines       56171    56205      +34     
==========================================
+ Hits        46846    46872      +26     
- Misses       9325     9333       +8     
Impacted Files Coverage Δ
arrow-flight/src/utils.rs 0.00% <0.00%> (ø)
...ng/src/flight_client_scenarios/integration_test.rs 0.00% <0.00%> (ø)
...ng/src/flight_server_scenarios/integration_test.rs 0.00% <0.00%> (ø)
arrow/src/ipc/reader.rs 90.73% <86.66%> (-0.11%) ⬇️
arrow/src/ipc/writer.rs 80.93% <100.00%> (+0.55%) ⬆️
parquet/src/encodings/encoding.rs 93.46% <0.00%> (-0.20%) ⬇️
parquet_derive/src/parquet_field.rs 65.98% <0.00%> (ø)

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 940b5b5...ea61242. 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. Do we need to do anything for write support?

@viirya
Copy link
Member Author

viirya commented Jun 5, 2022

Thanks @nevi-me

Yes, if specifying metadata_version as V4, the ipc writer also need to write validity buffer for UnionType Array. Currently it doesn't, although it doesn't affect the interop test.

I will create another PR after this for writer change and test.

@nevi-me nevi-me merged commit 73d552a into apache:master Jun 5, 2022
@@ -201,6 +206,13 @@ fn create_array(

let len = union_node.length() as usize;

// In V4, union types has validity bitmap
// In V5 and later, union types have no validity bitmap
if metadata < &ipc::MetadataVersion::V5 {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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 arrow-flight Changes to the arrow-flight crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust IPC Read should be able to read V4 UnionType Array
4 participants