the-other-tim-brown commented on code in PR #18108:
URL: https://github.com/apache/hudi/pull/18108#discussion_r2805125094
##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchema.java:
##########
@@ -152,20 +159,28 @@ public static HoodieSchema fromAvroSchema(Schema
avroSchema) {
if (avroSchema == null) {
return null;
}
+ HoodieSchema schema;
LogicalType logicalType = avroSchema.getLogicalType();
if (logicalType != null) {
if (logicalType instanceof LogicalTypes.Decimal) {
- return new HoodieSchema.Decimal(avroSchema);
+ schema = new HoodieSchema.Decimal(avroSchema);
} else if (logicalType instanceof LogicalTypes.TimeMillis || logicalType
instanceof LogicalTypes.TimeMicros) {
- return new HoodieSchema.Time(avroSchema);
+ schema = new HoodieSchema.Time(avroSchema);
} else if (logicalType instanceof LogicalTypes.TimestampMillis ||
logicalType instanceof LogicalTypes.TimestampMicros
|| logicalType instanceof LogicalTypes.LocalTimestampMillis ||
logicalType instanceof LogicalTypes.LocalTimestampMicros) {
- return new HoodieSchema.Timestamp(avroSchema);
+ schema = new HoodieSchema.Timestamp(avroSchema);
} else if (logicalType == VariantLogicalType.variant()) {
- return new HoodieSchema.Variant(avroSchema);
+ schema = new HoodieSchema.Variant(avroSchema);
+ } else if (logicalType == BlobLogicalType.blob()) {
Review Comment:
The logical type is registered in the static block so this should not be an
issue
--
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]