kurtostfeld commented on code in PR #25896: URL: https://github.com/apache/flink/pull/25896#discussion_r1978578476
########## flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/utils/AvroKryoSerializerUtils.java: ########## @@ -106,11 +105,55 @@ public void write(Kryo kryo, Output output, Schema object) { } @Override - public Schema read(Kryo kryo, Input input, Class<Schema> type) { + public Schema read(Kryo kryo, Input input, Class<? extends Schema> type) { String schemaAsString = input.readString(); // the parser seems to be stateful, to we need a new one for every type. Schema.Parser sParser = new Schema.Parser(); return sParser.parse(schemaAsString); } } + + public static class AvroGenericDataArraySerializer + extends CollectionSerializer<GenericData.Array> implements Serializable { + @Override + public void write(Kryo kryo, Output output, GenericData.Array collection) { + String schemaAsString = collection.getSchema().toString(false); Review Comment: I do notice that the Kryo library built-in serializers check for null, but I've added unit tests for the null scenario and I'm testing both the Flink serializer and the Kryo serializer directly and I can't create a scenario where null gets sent to that method. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org