Adrian McCague created AVRO-2029:
------------------------------------

             Summary: Specific Data generated class missing Decimal Conversion
                 Key: AVRO-2029
                 URL: https://issues.apache.org/jira/browse/AVRO-2029
             Project: Avro
          Issue Type: Bug
    Affects Versions: 1.8.2
            Reporter: Adrian McCague


Using 1.8.2-rc3

Given a class generated with {{-bigDecimal}}, the generated class defines the 
DECIMAL_CONVERSION but does not set it to a {{BigDecimal}} field index.

Fields for illustration:
{code}
@Deprecated public java.lang.String id;
@Deprecated public org.joda.time.DateTime timestamp;
@Deprecated public java.lang.String applicationId;
@Deprecated public java.math.BigDecimal amount;;

...

protected static final org.apache.avro.data.TimeConversions.TimestampConversion 
TIMESTAMP_CONVERSION = new 
org.apache.avro.data.TimeConversions.TimestampConversion();
protected static final org.apache.avro.Conversions.DecimalConversion 
DECIMAL_CONVERSION = new org.apache.avro.Conversions.DecimalConversion();

private static final org.apache.avro.Conversion<?>[] conversions =
      new org.apache.avro.Conversion<?>[] {
      null,
      TIMESTAMP_CONVERSION,
      null,
      null, // Should be DECIMAL_CONVERSION
      null,
      null,
      null,
      null,
      null
  };
{code}

I am currently unsure of the impact of this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to