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

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

[~xuefuz], you're right that this is between those two approaches. By working 
on the specification now, we're tackling the important part for 
interoperability, and leaving the details of Avro's implementation until later. 
This allows us to build decimal support in parallel, because we can all agree 
on how the encoding works and shouldn't be blocked on the Avro implementation 
details.

bq. ... relieves Avro from enforcing whatever it cannot guarantee anyway.

What do you mean? It's normal for a spec to require something that it can't 
guarantee. If you decide not to put an IP address in network-byte-order, for 
example, nothing "enforces" the rule -- but your packets go somewhere other 
than the intended address. Decimal is similar: everyone will interpret the 
bytes as big-endian two's complement. I think Avro (and similarly, parquet) is 
the right place for this spec because it is where the data resides. Otherwise, 
Pig could ignore Hive's implementation and build a competing encoding scheme. 
Putting this in Avro means there is only one correct way to share decimal 
numbers in Avro.

> Support for DECIMAL 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
>            Assignee: Tom White
>            Priority: Minor
>              Labels: Hive
>             Fix For: 1.7.7
>
>         Attachments: AVRO-1402-logical-type-spec-2.patch, 
> AVRO-1402-logical-type-spec-3.patch, AVRO-1402-logical-type-spec-4.patch, 
> AVRO-1402-logical-type-spec-5.patch, AVRO-1402-logical-type-spec.patch, 
> AVRO-1402.patch, AVRO-1402.patch, AVRO-1402.patch, AVRO-1402.patch, 
> UnixEpochRecordMapping.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