The FastSerializerGenerator calls Schema.getName() to create temporary variable names when iterating over some arrays and maps. If the element type is a union, then the name created by Schema.UnionSchema.getName() is not a valid Java identifier. The generated code causes compiler errors that look like this:
/tmp/generated16917366869434796488/com/linkedin/avro/fastserde/generated/serialization/AVRO_1_11/Record_GenericSerializer_1168413672.java:97: error: ']' expected
CharSequence union[null, string]0 = null;
This is only a problem starting with org.apache.avro:avro:1.12.0, which was released last month: apache/avro@ed2dbd4#diff-22eb7312aa7f632f0f9b1c3f40de619f91a303ee39f43d3a62a338adf745d1efR1289 . (There are other test failures related to logical types that will need to be fixed for full Avro 1.12.0 compatibility, but this was the only issue causing compilation errors.)
The
FastSerializerGeneratorcallsSchema.getName()to create temporary variable names when iterating over some arrays and maps. If the element type is a union, then the name created bySchema.UnionSchema.getName()is not a valid Java identifier. The generated code causes compiler errors that look like this:This is only a problem starting with
org.apache.avro:avro:1.12.0, which was released last month: apache/avro@ed2dbd4#diff-22eb7312aa7f632f0f9b1c3f40de619f91a303ee39f43d3a62a338adf745d1efR1289 . (There are other test failures related to logical types that will need to be fixed for full Avro 1.12.0 compatibility, but this was the only issue causing compilation errors.)