Hi Avro users mailing list,

I'm having trouble writing an Avro schema for java.math.BigDecimal type, I
tried the following:

1. Based on Avro official doc:
https://avro.apache.org/docs/1.8.1/spec.html#Decimal, I know I need to
define Logical Types myself to support BigDecimal, but that link gives
example only in avsc, I'm trying to figure it out in avdl.
2. Based on Avro dochttps://
avro.apache.org/docs/1.7.6/api/java/org/apache/avro/reflect/package-summary.html
and this example:
https://github.com/apache/avro/blob/master/share/test/schemas/stringables.avdl,
I wrote below avdl:



    @namespace("test")
    protocol My_Protocol_v1 {

      record BigDecimal {
            @java-class("java.math.BigDecimal") string value;
      }



But it's not working:
This IDL schema compiles fine and can generate a Java class called
BigDecimal, but I cannot really use the generated BigDecimal as
java.math.BigDecimal, what's wrong? or How should I do it?

Thanks a lot
Steve

Reply via email to