You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Fokko Driesprong (JIRA)" <ji...@apache.org> on 2019/05/31 17:55:00 UTC

[jira] [Resolved] (AVRO-2392) Logical type time-micros and timestamp-micros generate as long types.

     [ https://issues.apache.org/jira/browse/AVRO-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fokko Driesprong resolved AVRO-2392.
------------------------------------
    Resolution: Fixed

> Logical type time-micros and timestamp-micros generate as long types.
> ---------------------------------------------------------------------
>
>                 Key: AVRO-2392
>                 URL: https://issues.apache.org/jira/browse/AVRO-2392
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java, logical types
>    Affects Versions: 1.8.2
>            Reporter: Shameera Rathnayaka
>            Assignee: Shameera Rathnayaka
>            Priority: Major
>             Fix For: 1.9.1
>
>
> With Java code gen *time-micros* and *timestamp-micros* logical types generate as long typed value with Joda. 
> Following will generate AvroLogicalTypeExample class, which has both `*timeMicrosField*` and '*timestampMicrosField*` values as *long* typed instance variables.
> {code:java}
> {
> "type": "record",
> "namespace": "com.shameera.test",
> "name": "AvroLogicalTypeExample",
> "fields": [
>        {"name": "timeMicrosField",
>          "type": { 
>               "type": "long",
>                "logicalType": "time-micros"
>            }
>          },
>         {"name": "timestampMicrosField",
>           "type": {
>                 "type": "long",
>                 "logicalType": "timestamp-micros"
>               }
>          }
>      ]
> }
> {code}
> https://issues.apache.org/jira/browse/AVRO-2123 partially address this issue, that is why I created a separate issue to track only the issue with micros times. 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)