[
https://issues.apache.org/jira/browse/AVRO-1269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592402#comment-13592402
]
Doug Cutting commented on AVRO-1269:
------------------------------------
Avro's Reflect API does support BigDecimal and BigInteger. They're written
with a schema like, {"type":"string", "java-class":"java.math.BigDecimal"}.
Using such a schema, ReflectDatumWriter will write BigDecimal instances and
ReflectDatumReader will reconstruct a BigDecimal. This was added in AVRO-1146.
We should update the reflect package documentation
(http://avro.apache.org/docs/current/api/java/org/apache/avro/reflect/package-summary.html)
to better document this.
Converting SQL's DECIMAL or NUMERIC to Avro's long or float would be lossy.
> AVRO is converting ORACLE,Netezza,Teradata decmials & long integers to
> Strings.
> -------------------------------------------------------------------------------
>
> Key: AVRO-1269
> URL: https://issues.apache.org/jira/browse/AVRO-1269
> Project: Avro
> Issue Type: Bug
> Affects Versions: 1.7.1
> Reporter: Prasad Dasari
>
> I tried to sqoop ORALCE,NETEZZA,TERADATA tables with AVRO foramt using plain
> JDBC (without using Cloudera connectors). I can see DECIMAL & NUMERIC data
> types are being converted to AVRO Strings.
> Oracle -- NUMBER & INTEGER data types are being converted to
> AVRO String format.
> NETEZZA -- DECIMAL,NUMERIC data types are converted to AVRO String
> format.
> Teradata -- DECIMAL AND LONG data types are converted to AVRO String
> format.
> When i tried with map-columns to BigDecimal,BigInteger i can see AVRO does
> not support BigDecimal error message.
> Thanks,
> Prasad Dasari.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira