mkhludnev commented on code in PR #27329:
URL: https://github.com/apache/beam/pull/27329#discussion_r1268539246
##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/schemas/utils/AvroUtils.java:
##########
@@ -1022,9 +1046,23 @@ private static org.apache.avro.Schema getFieldSchema(
break;
case DECIMAL:
- baseType =
- LogicalTypes.decimal(Integer.MAX_VALUE)
- .addToSchema(org.apache.avro.Schema.create(Type.BYTES));
+ // Beam avro decimal defaults: type=bytes, precision=MAX_INT, scale=0
+ String type = options.hasOption("type") ? options.getValue("type") :
"bytes";
Review Comment:
I think it somehow should work via explicit LogicalType rather than untyped
options.
--
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]