Skip to content

feat: support uuid from fixed type of length 16#10241

Open
ariel-miculas wants to merge 2 commits into
apache:mainfrom
ariel-miculas:uuid-from-fixed-size-list
Open

feat: support uuid from fixed type of length 16#10241
ariel-miculas wants to merge 2 commits into
apache:mainfrom
ariel-miculas:uuid-from-fixed-size-list

Conversation

@ariel-miculas

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Related to #8703

Rationale for this change

In version 1.12.0 of the spec, uuid is allowed to be either an Avro string or fixed of length 16.

What changes are included in this PR?

Are these changes tested?

Added a unit test

Are there any user-facing changes?

The uuid logical type is inserted into the arrow Field metadata if the uuid logical type is present as a logical annotation on the avro type.

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-avro arrow-avro crate labels Jun 29, 2026
Comment thread arrow-avro/src/codec.rs
Comment on lines 1555 to +1569
Some("duration") => {
if size != 12 {
return Err(ArrowError::ParseError(format!(
"Invalid fixed size for Duration: {size}, must be 12"
)));
};
AvroDataType {
nullability: None,
metadata,
codec: Codec::Interval,
resolution: None,
}
}
Some("uuid") if size == 16 => {
metadata.insert("logicalType".into(), "uuid".into());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there significance to duration above error checking the size, whilst for uuid we silently pass to the catchall below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no, it's better to return an error, I'll update it

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-avro arrow-avro crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants