Avro schemas are defined using JSON. Schemas are composed of primitive types (null, boolean, int, long, float, double, bytes, and string) and complex types (record, enum, array, map, union, and fixed). I want to ask which one is proper for BigDecimal.
Avro introduced logical types in 1.7.7 (I believe) that should help you serialize decimal.
https://avro.apache.org/docs/1.8.1/spec.html#Decimal
Here is the code :
"type": [ {
"type": "string",
"java-class": "java.math.BigDecimal"
} ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With