danielhumanmod commented on code in PR #518:
URL: https://github.com/apache/incubator-xtable/pull/518#discussion_r1722665531
##########
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:
> 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.
> `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
Already added corresponding Prop in latest commit, thanks for providing this
context Tim!
--
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]