blackmwk commented on code in PR #2916:
URL: https://github.com/apache/iceberg-rust/pull/2916#discussion_r3764716821


##########
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:
   I'm confused, how is this different from AvroSchema::Uuid?



##########
crates/integration_tests/src/lib.rs:
##########
@@ -52,6 +54,16 @@ impl GlobalTestFixture {
 
         GlobalTestFixture { catalog_config }
     }
+
+    pub async fn rest_catalog(&self) -> RestCatalog {

Review Comment:
   Why we need this?



##########
crates/iceberg/src/spec/values/tests.rs:
##########
@@ -240,7 +240,7 @@ fn json_timestamptz_ns_rejects_non_utc_offset() {
     // Per the spec, timestamptz_ns single-value serialization must use offset 
"+00:00"; Java's
     // SingleValueParser enforces the same (DateTimeUtil.isUTCTimestamptz). A 
non-UTC offset is not a
     // valid encoding and must be rejected, not silently re-based to UTC.
-    let record = 
serde_json::Value::String("2017-11-16T22:31:08.123456789+05:00".to_string());
+    let record = 
JsonValue::String("2017-11-16T22:31:08.123456789+05:00".to_string());

Review Comment:
   Why is this related?



##########
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:
   Also this pr only changed iceberg schema to avro schema, I think we should 
also do vice versa?



-- 
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]

Reply via email to