You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2014/03/13 17:11:50 UTC

[jira] [Commented] (AVRO-739) Add Date/Time data types

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

Doug Cutting commented on AVRO-739:
-----------------------------------

Here's another approach.  Instead of defining some new record types (which would bloat schemas), or some new primitives (which would be incompatible), might we instead standardize on some attributes?

Thus we might use something like:
  {"type":"string", "subType":"ISO-8601-date"}

This could be added to the specification, as an optional extension.  If it's specified, then the string must be in ISO 8601 format.

We could also have a type like:
  {"type":"long", "subType":"unix-epoch"}

Note that with both of these formats, sorting by the primitive Avro type is consistent with sorting by time.

Implementations can insert language-specific types for these at runtime.

This approach might also be used to handle decimal values, using a lexicographic-friendly string format.

http://www.zanopha.com/docs/elen.pdf


> Add Date/Time data types
> ------------------------
>
>                 Key: AVRO-739
>                 URL: https://issues.apache.org/jira/browse/AVRO-739
>             Project: Avro
>          Issue Type: New Feature
>          Components: spec
>            Reporter: Jeff Hammerbacher
>         Attachments: AVRO-739.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)