[
https://issues.apache.org/jira/browse/AVRO-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16780956#comment-16780956
]
Zoltan Farkas commented on AVRO-2328:
-------------------------------------
In my fork (zolyfarkas/avro) I implemented a "instant" logical type that
converts to Jdk Instant.
(This is the right abstraction for timestamps)
that can be applied to:
* string : iso format in Z timezone
* long: millis since epoch.
* record:
{code}
/** a instant type */
@logicalType("instant")
record Instant {
/** nr seconds since UNIX epoch */
long epochSecond;
/** nanosecond component */
int nano;
}
{code}
> Support distinguishing between LocalDateTime and Instant semantics in
> timestamps
> --------------------------------------------------------------------------------
>
> Key: AVRO-2328
> URL: https://issues.apache.org/jira/browse/AVRO-2328
> Project: Apache Avro
> Issue Type: Task
> Reporter: Zoltan Ivanfi
> Assignee: Nandor Kollar
> Priority: Major
>
> Different SQL engines of the Hadoop stack support different timestamp
> semantics. The range of supported semantics is about to be extended even
> further. While some of the new timestamp types can be added to SQL without
> explicit support from the file formats, others require new physical types.
> File format support would be beneficial even for timestamp semantics where it
> is not strictly required, because it would enable correct interpretation
> without an SQL schema or any other kind of manual configuration.
> This JIRA is about supporting the LocalDateTime and Instant semantics. See
> [this
> document|https://docs.google.com/document/d/1E-7miCh4qK6Mg54b-Dh5VOyhGX8V4xdMXKIHJL36a9U/edit#]
> for details.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)