Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.9.0, 1.8.2, 1.9.1
-
None
-
None
Description
SpecificCompiler::compile(Schema) always calls addStringType on the Schema first. If SpecificCompiler::stringType is not StringType.String, this is a No-Op and Custom Conversions work as desired. However, if stringType IS set to StringType.String, the Schema is deep copied to patch the String Types (why?), thereby loosing all Logical Types. This, in turn, prevents Conversions from being applied.
A possible fix (haven't tried yet) might be to add
private Schema addStringType(Schema s, Map<Schema, Schema> seen) {
{{ }}
...
result.addAllProps(s);
+ result.SetLogicalType(s.getLogicalType());
seen.put(s, result);
return result;
}
Attachments
Issue Links
- duplicates
-
AVRO-2548 StringType of "String" causes logicalType converters to be ignored for field
- Resolved