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

Tim Swast commented on AVRO-2328:
---------------------------------

Similar to your proposed "LocalDateTime", BigQuery already populates a logical 
type called "datetime", corresponding with DATETIME columns in its export to 
Avro format.

When BigQuery exports to Avro, they encode the value as an RFC 3339 string, but 
without timezone information (e.g. "1970-01-01T00:00:00") and call the logical 
type / SQL type "datetime", but this behavior isn't currently documented.

Related work: Parquet uses timestamp logical type, but with "isAdjustedToUTC" 
parameter for this use caseĀ https://issues.apache.org/jira/browse/PARQUET-1545

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

Reply via email to