Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.8.2, 1.10.0, 1.9.2, 1.10.1, 1.10.2
Description
When parsing Avro IDL in code, the resulting protocol types (schemas) have no logical types defined, when though the properties for them are set.
Example IDL:
protocol P { record R { @logicalType("timestamp-micros") long uTime; } }
The following test fails on the second assert:
@Test public void validateIdlLogicalTypeParsing() { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); Idl idl = new Idl(cl.getResourceAsStream("logicalTypes.avdl"), "UTF-8"); Protocol protocol = idl.CompilationUnit(); Schema fieldSchema = protocol.getType("R").getField("uTime").schema(); Assert.assertEquals("timestamp-micros", fieldSchema.getObjectProp("logicalType")); Assert.assertNotNull(fieldSchema.getLogicalType()); }
A minimal proof is attached.
Attachments
Attachments
Issue Links
- links to