wzx140 commented on code in PR #520:
URL: https://github.com/apache/parquet-mr/pull/520#discussion_r1016760195
##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroSchemaConverter.java:
##########
@@ -301,17 +308,17 @@ public Schema
convertFIXED_LEN_BYTE_ARRAY(PrimitiveTypeName primitiveTypeName) {
}
@Override
public Schema convertBINARY(PrimitiveTypeName primitiveTypeName) {
- if (annotation == OriginalType.UTF8 || annotation ==
OriginalType.ENUM) {
+ if (annotation instanceof
LogicalTypeAnnotation.StringLogicalTypeAnnotation ||
+ annotation instanceof
LogicalTypeAnnotation.EnumLogicalTypeAnnotation) {
return Schema.create(Schema.Type.STRING);
} else {
return Schema.create(Schema.Type.BYTES);
}
}
});
- LogicalType logicalType = convertOriginalType(
- annotation, asPrimitive.getDecimalMetadata());
- if (logicalType != null && (annotation != DECIMAL ||
+ LogicalType logicalType = convertLogicalType(annotation);
+ if (logicalType != null && (!(annotation instanceof
LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) ||
Review Comment:
@gszadovszky Cloud you please explain why skip DecimalLogicalTypeAnnotation
here. Parquet could store int32/int64 as decimal. I don't understand this.
--
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]