Skip to content

Fix Iceberg to Avro Schema Conversion: Fixed, Decimal, UUID#53

Merged
Fokko merged 1 commit intoapache:mainfrom
HonahX:bug_fix/iceberg_to_avro_schema_conversion
Oct 13, 2023
Merged

Fix Iceberg to Avro Schema Conversion: Fixed, Decimal, UUID#53
Fokko merged 1 commit intoapache:mainfrom
HonahX:bug_fix/iceberg_to_avro_schema_conversion

Conversation

@HonahX
Copy link
Copy Markdown
Contributor

@HonahX HonahX commented Oct 9, 2023

Fix #14

This PR fixes incorrect schema conversion from Iceberg's Fixed, Decimal, and UUID to Avro's:

  • Fixed and UUID: missing required field "name"
  • Decimal: According to spec and the current avro writer implementation, decimal is written as a "fixed" type instead of "bytes"

@Fokko Fokko added this to the PyIceberg 0.6.0 release milestone Oct 9, 2023
"precision": decimal_type.precision,
"scale": decimal_type.scale,
"name": f"decimal_{decimal_type.precision}_{decimal_type.scale}",
}
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.

These changes look correct to me. Thanks, @HonahX!

Copy link
Copy Markdown
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks @HonahX for fixing this 👍

@Fokko Fokko merged commit 0644664 into apache:main Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AvroWriter Issue: Incorrect iceberg_to_avro Schema Conversion for Decimal, Fixed, and UUID

3 participants