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

Ryan Blue commented on AVRO-739:
--------------------------------

On the endianness of numbers in the "interval" type:

bq. This array stores three little-endian unsigned integers that represent 
durations at different granularities of time. The first stores a number in 
months, the second stores a number in days, and the third stores a number in 
milliseconds. . . .

I don't think we need to specify a JSON representation because this should use 
whatever the JSON representation of a fixed(12) is. The logical type just 
states how those bytes should be interpreted.

bq. Consider for example a financial product whose definition says that it 
"ceases to trade on YYYY-MM-DD hh:mm Moscow time". . .

I think the right way to handle this is to use the zone-independent date/time 
types and an application-level zone implementation. These cases aren't very 
common, as you noted, and I think having a timestamp with zone logical type 
allows people to get around best practices and doesn't deliver a better 
solution for people that actually need to represent the zone. It may be 
slightly easier to represent the type in a single field, but size is 
significantly larger and the value only has significance when interpreted at 
the application layer anyway.

> 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
>             Fix For: 1.7.8
>
>         Attachments: AVRO-739-datetime-spec.xml.patch, AVRO-739.patch
>
>




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

Reply via email to