yanghua commented on a change in pull request #3837:
URL: https://github.com/apache/hudi/pull/3837#discussion_r733343080
##########
File path: hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
##########
@@ -546,8 +546,11 @@ private static Object
convertValueForAvroLogicalTypes(Schema fieldSchema, Object
return decimalConversion.fromFixed((GenericFixed) fieldValue,
fieldSchema,
LogicalTypes.decimal(dc.getPrecision(), dc.getScale()));
} else if (fieldSchema.getType() == Schema.Type.BYTES) {
- return decimalConversion.fromBytes((ByteBuffer) fieldValue,
fieldSchema,
- LogicalTypes.decimal(dc.getPrecision(), dc.getScale()));
+ ByteBuffer byteBuffer = (ByteBuffer) fieldValue;
+ BigDecimal convertedValue = decimalConversion.fromBytes((ByteBuffer)
fieldValue, fieldSchema,
Review comment:
can we replace `(ByteBuffer) fieldValue` to be the defined variable
`byteBuffer `?
--
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]