-
Type:
Bug
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: 1.9.2
-
Fix Version/s: None
-
Component/s: java
-
Labels:None
-
Environment:
- Apache Avro Version [1.10.0]
- Java Version [11]
Steps to reproduce :
- Using the avro-compiler jar generate code with the following avsc:
{ "type": "record", "name": "Messages", "namespace": "com.somedomain", "fields": [ { "name": "not_optional_micros", "type": { "type": "long", "logicalType": "timestamp-micros" } }, { "name": "optional_date_micros", "type": [ "null", { "type": "long", "logicalType": "timestamp-micros" } ], "default": null } ] }
Actual results:
In the generated code, the conversion type added to the MODEL$ object incorrect. Timestamp*Millis*Conversion is added instead of TimestampMicrosConversion.
static { MODEL$.addLogicalTypeConversion(new org.apache.avro.data.TimeConversions.TimestampMillisConversion()); }
Expected results:
Based on the above avsc the following is expected.
static { MODEL$.addLogicalTypeConversion(new org.apache.avro.data.TimeConversions.TimestampMicrosConversion()); }
- duplicates
-
AVRO-2471 Java maven plugin code generation doesn't add conversion for timestamp-micros
-
- Open
-