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

Added support for byte vectors and slices to parquet_derive (#3864) #3878

Merged
merged 1 commit into from
Mar 18, 2023

Conversation

waymost
Copy link
Contributor

@waymost waymost commented Mar 17, 2023

Which issue does this PR close?

Closes #3864.

Rationale for this change

parquet_derive was missing some code to be able to handle byte vectors and slices in structs. The readme even currently states that Vec<u8> is supported even though it doesn't currently work.

What changes are included in this PR?

This change enables support for Vec<u8>, Option<Vec<u8>>, &Option<Vec<u8>>, &[u8], and &Option<&[u8]> in parquet_derive. All of these cases have been added to the integration test in parquet_derive_test.

This fix required adding a Slice variant to the parquet_derive::parquet_field::Type enum as well as implementing From<&[u8]> for parquet::data_type::ByteArray.

Are there any user-facing changes?

No

@github-actions github-actions bot added parquet Changes to the parquet crate parquet-derive labels Mar 17, 2023
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 @waymost -- this looks good to me, though I am not super familiar with this code.

I kicked off the CI checks

@alamb
Copy link
Contributor

alamb commented Mar 17, 2023

I'll plan to merge this over the next few days unless there are other comments

@alamb alamb merged commit 7bf7ea5 into apache:master Mar 18, 2023
@alamb
Copy link
Contributor

alamb commented Mar 18, 2023

Thanks again @waymost -- this will be published to crates.io I think in about a week with the next regular arrow-rs release

@waymost
Copy link
Contributor Author

waymost commented Mar 20, 2023

Thanks for merging this so quickly @alamb!

@alamb
Copy link
Contributor

alamb commented Mar 20, 2023

👍 FYI #3889 tracks the release that will include this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parquet_derive doesn't support Vec<u8>
2 participants