mkhludnev commented on code in PR #27406:
URL: https://github.com/apache/beam/pull/27406#discussion_r1259516781
##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/schemas/utils/AvroUtils.java:
##########
@@ -1124,6 +1080,53 @@ private static org.apache.avro.Schema getFieldSchema(
return fieldType.getNullable() ? ReflectData.makeNullable(baseType) :
baseType;
}
+ private static org.apache.avro.Schema getLogicalTypeFieldSchema(FieldType
fieldType, String fieldName, String namespace) {
+ org.apache.avro.Schema baseType;
+ String identifier = fieldType.getLogicalType().getIdentifier();
+ if (FixedBytes.IDENTIFIER.equals(identifier)) {
+ FixedBytesField fixedBytesField =
+ checkNotNull(FixedBytesField.fromBeamFieldType(fieldType));
+ baseType = fixedBytesField.toAvroType("fixed", namespace + "." +
fieldName);
+ } else if (FixedPrecisionNumeric.IDENTIFIER.equals(identifier)) {
+ FixedPrecisionNumeric decimalType =
fieldType.getLogicalType(FixedPrecisionNumeric.class);
Review Comment:
here's what been added
--
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]