JosephLenton commented on code in PR #2916:
URL: https://github.com/apache/iceberg-rust/pull/2916#discussion_r4415114460
##########
crates/iceberg/src/avro/schema.rs:
##########
@@ -289,6 +289,21 @@ pub(crate) fn avro_fixed_schema(len: usize) ->
Result<AvroSchema> {
}))
}
+/// Build the Avro schema for the Iceberg `uuid` primitive type.
+///
+/// The Iceberg spec maps `uuid` to `{"type": "fixed", "size": 16,
"logicalType": "uuid"}`,
+/// i.e. 16 raw bytes, which is what iceberg-java writes.
+fn avro_uuid_schema() -> Result<AvroSchema> {
Review Comment:
To answer how this thread has changed ... when this PR was started Iceberg
was using Avro 0.21, and the UUID was stored as bytes. That was wrong.
As Iceberg is now on Avro 0.22, we have a working AvroSchema::Uuid, which I
am now using.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]