vroyer commented on a change in pull request #10428:
URL: https://github.com/apache/pulsar/pull/10428#discussion_r623248829
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java
##########
@@ -127,7 +127,12 @@ public static void addLogicalTypeConversions(ReflectData
reflectData, boolean js
}
}
reflectData.addLogicalTypeConversion(new Conversions.UUIDConversion());
- reflectData.addLogicalTypeConversion(new
Conversions.DecimalConversion());
+ reflectData.addLogicalTypeConversion(new
Conversions.DecimalConversion() {
+ @Override
+ public org.apache.avro.Schema getRecommendedSchema() {
+ return
LogicalTypes.decimal(100,51).addToSchema(org.apache.avro.Schema.create(org.apache.avro.Schema.Type.BYTES));
Review comment:
Yes, this a static function, so we could use some system props here.
BTW, this is better to support BigDecimal with this default hardcoded
settings rather than not support it at all.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]