the-other-tim-brown commented on code in PR #518:
URL: https://github.com/apache/incubator-xtable/pull/518#discussion_r1721112748


##########
xtable-core/src/main/java/org/apache/xtable/avro/AvroSchemaConverter.java:
##########
@@ -435,6 +435,11 @@ private Schema fromInternalSchema(InternalSchema 
internalSchema, String currentP
             Schema.createFixed(
                 internalSchema.getName(), internalSchema.getComment(), null, 
fixedSize),
             internalSchema);
+      case UUID:
+        // Convert to fixed 16-byte array since Avro does not support UUID 
natively
+        return finalizeSchema(
+            Schema.createFixed(internalSchema.getName(), 
internalSchema.getComment(), null, 16),

Review Comment:
   `Schema` exposes an `addProp` method. We could try to add a prop here that 
allows us to determine that a fixed byte array should be treated as an UUID in 
XTable



##########
xtable-core/src/main/java/org/apache/xtable/avro/AvroSchemaConverter.java:
##########
@@ -435,6 +435,11 @@ private Schema fromInternalSchema(InternalSchema 
internalSchema, String currentP
             Schema.createFixed(
                 internalSchema.getName(), internalSchema.getComment(), null, 
fixedSize),
             internalSchema);
+      case UUID:
+        // Convert to fixed 16-byte array since Avro does not support UUID 
natively

Review Comment:
   technically there is a logical type for UUID in recent versions of avro 
https://avro.apache.org/docs/1.10.0/spec.html#UUID, but this is mentioning it 
is really just an annotation on a string field.



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

Reply via email to