izemlyanskiy commented on a change in pull request #1584:
URL: https://github.com/apache/avro/pull/1584#discussion_r839645750
##########
File path: lang/java/avro/src/main/java/org/apache/avro/Conversions.java
##########
@@ -77,6 +77,21 @@ public String getLogicalTypeName() {
return "decimal";
}
+ @Override
+ public BigDecimal fromCharSequence(CharSequence value, Schema schema,
LogicalType type) {
+ BigDecimal result = new BigDecimal(value.toString());
+ int scale = ((LogicalTypes.Decimal) type).getScale();
Review comment:
thanks for bringing it up, that's a good idea. But right now we don't do
it in other `from*` method. I thought we go to be consistent.
I'd say we can create another PR/issue dedicated to the validation of
precision and discuss it over there.
--
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]