You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scio's default AvroCoder fails to encode records with non-null values, throwing the following error:
[info] org.apache.avro.UnresolvedUnionException: Not in union ["null",{"type":"bytes","logicalType":"decimal","precision":4,"scale":2}]: 1.00
[info] at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:910)
[info] at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:307)
[info] at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:157)
[info] at org.apache.avro.specific.SpecificDatumWriter.writeField(SpecificDatumWriter.java:108)
[info] at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:234)
[info] at org.apache.avro.specific.SpecificDatumWriter.writeRecord(SpecificDatumWriter.java:92)
[info] at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:145)
[info] at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:95)
[info] at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:82)
[info] at org.apache.beam.sdk.extensions.avro.coders.AvroCoder.encode(AvroCoder.java:428)
(It works on Avro 1.8.2.)
This seems like it might be an issue with Avro itself (when you step through with a debugger, the GenericDatumWriter doesn't have the right conversions registered for the class), but we could still provide a workaround for it in Scio's SpecificDatumFactory?
Given the following schema:
Scio's default AvroCoder fails to encode records with non-null values, throwing the following error:
(It works on Avro 1.8.2.)
This seems like it might be an issue with Avro itself (when you step through with a debugger, the GenericDatumWriter doesn't have the right conversions registered for the class), but we could still provide a workaround for it in Scio's SpecificDatumFactory?
Full repro: https://github.com/spotify/scio/compare/repro-nullable-decimal-err?expand=1
The text was updated successfully, but these errors were encountered: