mbrobbel opened a new pull request, #5821:
URL: https://github.com/apache/arrow-rs/pull/5821
# Rationale for this change
I want to add support to the `parquet` crate, so that
[parquet::arrow::arrow_to_parquet_schema](https://docs.rs/parquet/latest/parquet/arrow/fn.arrow_to_parquet_schema.html)
and
[parquet::arrow::parquet_to_arrow_schema](https://docs.rs/parquet/latest/parquet/arrow/fn.parquet_to_arrow_schema.html)
can roundtrip the canonical [`uuid` extension
type](https://arrow.apache.org/docs/dev/format/CanonicalExtensions.html#uuid).
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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]