You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ryan Blue (JIRA)" <ji...@apache.org> on 2015/07/03 21:05:04 UTC

[jira] [Commented] (AVRO-1672) Add logical types and conversions for date, time, and timestamp.

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

Ryan Blue commented on AVRO-1672:
---------------------------------

[~tomwhite], could you have another look at this? I think it is ready to commit.

I've removed the specific commits that were accidentally included in this PR and I've added support for the recently-committed microsecond types. The microsecond types have two conversions, a read-only conversion and a "lossy" conversion. The read-only conversion will discard microseconds and provide a Joda representation of the underlying data and will fail if you try to write microsecond data.

The lossy conversions will write microsecond time and timestamp by converting the Joda representation's milliseconds to microseconds (multiply by 1000). This is called "lossy" because reading a record and then writing it out will discard the microseconds, since they can't be held in the in-memory representation. Having two conversions allows users to choose how to handle this case if they want to use Joda objects.

Lastly, I also verified with another project that the Joda dependency is not pulled in transitively with the settings in the current POM.

> Add logical types and conversions for date, time, and timestamp.
> ----------------------------------------------------------------
>
>                 Key: AVRO-1672
>                 URL: https://issues.apache.org/jira/browse/AVRO-1672
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.7
>            Reporter: Ryan Blue
>            Assignee: Ryan Blue
>             Fix For: 1.7.8
>
>         Attachments: AVRO-1672-1.patch
>
>
> AVRO-739 added specs for date, time (ms), and timestamp (ms) logical types. Now that AVRO-1497 has been committed, we should add those new logical types and conversions for them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)