title: java.math.BigDecimal to Avro .avdl file
body: <p>I'm having trouble writing an Avro schema for java.math.BigDecimal type, I tried the following:</p>
  
  <ol>
  <li>Based on Avro official <a href="https://avro.apache.org/docs/1.8.1/spec.html#Decimal" rel="nofollow noreferrer">doc</a>, 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.</li>
  <li>Based on Avro <a href="https://avro.apache.org/docs/1.7.6/api/java/org/apache/avro/reflect/package-summary.html" rel="nofollow noreferrer">doc</a> and this <a href="https://github.com/apache/avro/blob/master/share/test/schemas/stringables.avdl" rel="nofollow noreferrer">example</a>, I wrote below avdl:</li>
  </ol>
  
  <p>`</p>
  
  <pre><code>@namespace("test")
  protocol My_Protocol_v1 {
  
    record BigDecimal {
          @java-class("java.math.BigDecimal") string value;
    }
  </code></pre>
  
  <p>`</p>
  
  <p>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?</p>
  
  <p>Thanks a lot</p>