avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Blue (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1402) Support for DECIMAL type
Date Thu, 10 Apr 2014 21:18:24 GMT

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

Ryan Blue commented on AVRO-1402:

bq. "Language implementations may choose to represent logical types with an appropriate native
type, although this is not required"? Is this referring to logical types not explicitly defined
in the spec?

I think this defines backward-compatibility. It is fine if an implementation returns the underlying
type (e.g. bytes) rather than translating to an object representation (e.g., BigDecimal).
That way, this doesn't require implementation changes right away and we can determine the
best way to transition to returning logical type objects.

For types not defined in this spec, I think the library should support reading types by returning
the underlying type's object representation. But to avoid incompatibilities, writers should
reject any logical type annotations that are not defined in the spec.

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

View raw message