eolivelli commented on a change in pull request #10428:
URL: https://github.com/apache/pulsar/pull/10428#discussion_r623883830
##########
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:
we already have "isJsr310ConversionEnabled" and "getAlwaysAllowNull"
why don't we store precision and scale the same way ? this way they will be
stored in the registry and consumers will use the right version of the schema
--
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]