[
https://issues.apache.org/jira/browse/AVRO-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13956582#comment-13956582
]
Tom White commented on AVRO-1402:
---------------------------------
bq. Most of time, same application (such as Hive AvroSerde) will be used to
write/read the data, so the way data is stored can be controlled.
I agree, but as far as I can tell Hive and MySQL do store per-row scale values.
E.g.
https://github.com/apache/hive/blob/trunk/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritable.java#L113.
Another argument for storing the scale in the data is that if you have scale as
an Avro schema property, then you change the values of the data by providing a
different read schema since the schema property is ignored during Avro schema
resolution (http://avro.apache.org/docs/1.7.6/spec.html#Schema+Resolution).
Compare this to Avro fixed where you can't change the size field in a read
schema.
> Support for DECIMAL primitive type
> ----------------------------------
>
> Key: AVRO-1402
> URL: https://issues.apache.org/jira/browse/AVRO-1402
> Project: Avro
> Issue Type: New Feature
> Affects Versions: 1.7.5
> Reporter: Mariano Dominguez
> Priority: Minor
> Labels: Hive
> Attachments: AVRO-1402.patch, AVRO-1402.patch, AVRO-1402.patch
>
>
> Currently, Avro does not seem to support a DECIMAL type or equivalent.
> http://avro.apache.org/docs/1.7.5/spec.html#schema_primitive
> Adding DECIMAL support would be particularly interesting when converting
> types from Avro to Hive, since DECIMAL is already a supported data type in
> Hive (0.11.0).
--
This message was sent by Atlassian JIRA
(v6.2#6252)