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

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

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

HonahX
Copy link
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
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
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