[
https://issues.apache.org/jira/browse/AVRO-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14620928#comment-14620928
]
ASF subversion and git services commented on AVRO-1672:
-------------------------------------------------------
Commit 1690131 from [[email protected]] in branch 'avro/trunk'
[ https://svn.apache.org/r1690131 ]
AVRO-1672: Add time logical types and conversions.
This uses Joda classes to represent the new logical types:
* date => LocalDate
* time-millis => LocalTime
* time-micros => LocalTime
* timestamp-millis => DateTime
* timestamp-micros => DateTime
Joda is an optional dependency and will only be loaded if the
conversions in org.apache.avro.data.TimeConversions are referenced. By
default, no logical type conversions are enabled so there is no
additional runtime dependency for existing applications.
Microsecond types use Joda objects with millisecond precision. Because
this representation loses the microseconds, there are two conversions
for both microsecond types: a read-only conversion that will throw an
exception if used to write, and a "lossy" conversion that will write a
millisecond value as microseconds by convertsion. This is called "lossy"
because reading a microsecond value and writing it back out will lose
the microseconds.
> 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-1672-2.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)