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

Check length of FIXED_LEN_BYTE_ARRAY for uuid logical parquet type #5821

Merged
merged 1 commit into from
May 31, 2024

Conversation

mbrobbel
Copy link
Contributor

Rationale for this change

I want to add support to the parquet crate, so that parquet::arrow::arrow_to_parquet_schema and parquet::arrow::parquet_to_arrow_schema can roundtrip the canonical uuid extension type.

It seems the PrimitiveTypeBuilder was missing a length (16) check for the uuid logical type. This PR adds the check, following the pattern used for other logical types that have a length requirement.

What changes are included in this PR?

Adds a check for the length of a PhysicalType::FIXED_LEN_BYTE_ARRAY when it's annotated with LogicalType::Uuid.

Are there any user-facing changes?

The builder now returns an error if the length is not 16 when trying to annotate a PhysicalType::FIXED_LEN_BYTE_ARRAY with LogicalType::Uuid.

@github-actions github-actions bot added the parquet Changes to the parquet crate label May 31, 2024
@tustvold tustvold merged commit c2b05cd into apache:master May 31, 2024
16 checks passed
@mbrobbel mbrobbel deleted the parquet-uuid branch May 31, 2024 13:27
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.

2 participants