Shameera Rathnayaka created AVRO-2392:
-----------------------------------------
Summary: 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
Fix For: 1.9.0, 1.8.3
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)