[ 
https://issues.apache.org/jira/browse/AVRO-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943505#comment-13943505
 ] 

Ryan Blue commented on AVRO-1402:
---------------------------------

>From looking around at other database docs, it looks like most use a fixed 
>scale (or don't specify) and [SQL 
>server|http://msdn.microsoft.com/en-us/library/ms187746.aspx] even states that 
>different scales are considered different types. But in 
>[postgres|http://www.postgresql.org/docs/9.1/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL],
> the scale is the maximum scale for all values in the column, which may make a 
>case for per-value scales. I think there is enough precedent behind fixing the 
>scale for a column that it's reasonable to have a type that fixes the scale 
>like this:
   {"type":"bytes", "logicalType": "decimal", "scale": 2}

Then we could include in the specification how to determine the scale from data 
if it is missing.

> 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
>
>
> 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)

Reply via email to