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

feat(ipc): support for reading union arrays through IPC #1140

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

helgikrs
Copy link
Contributor

@helgikrs helgikrs commented Jan 6, 2022

Which issue does this PR close?

Together with #1135, closes #654.

What changes are included in this PR?

With this change, IPC serialized arrow data containing unions can be deserialized successfully. This PR includes test cases round-tripping unions through the IPC writer and reader.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 6, 2022
@helgikrs helgikrs force-pushed the ipc-read-union branch 2 times, most recently from b226278 to ad9294b Compare January 6, 2022 18:03
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @helgikrs! LGTM

let batch2: std::result::Result<Vec<_>, _> = reader.collect();
let rb = RecordBatch::try_new(schema, vec![union_array]).unwrap();
let rb2 = roundtrip_ipc(&rb);
// TODO: equality not yet implemented for union, so we check that the length of the array is
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit a579f9d into apache:master Jan 6, 2022
@paddyhoran
Copy link
Contributor

Thank you very much for this @helgikrs!

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.

Add IPC support for Union Array
3 participants