Details
-
Improvement
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
1.8.1
-
None
Description
AvroSchema is taken from a compiled avsc file which contains a decimal field.
AvroSchema.Builder builder = AvroSchema.newBuilder(); BigDecimal bd = new BigDecimal(new BigInteger("155"), 3); campaignBuilder.setDecimalField(bd); AvroSchema source = builder.build(); //This line causes an exception AvroSchema.Builder builder1 = AvroSchema.newBuilder(source);
Exception:
InvocationTargetException: java.math.BigDecimal cannot be cast to java.nio.ByteBuffer
The same failure happens with GenericData as well:
GenericRecord copy = GenericData.get().deepCopy(AvroSchema.getClassSchema(), source);
Attachments
Attachments
Issue Links
- relates to
-
AVRO-2212 GenericData.deepCopyRaw not working with java.lang.BigDecimal
- Resolved