avi-sanwal commented on code in PR #28161:
URL: https://github.com/apache/flink/pull/28161#discussion_r3263403688
##########
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java:
##########
@@ -325,6 +330,30 @@ private void initializeAvro() {
this.avroData = factory.getAvroData();
}
+ private T resolveGenericRecord(T value) throws IOException {
+ if (value == null || !isGenericRecord(type)) {
+ return value;
+ }
+
+ final GenericRecord record = (GenericRecord) value;
+ final Schema recordSchema = record.getSchema();
+ if (Objects.equals(recordSchema, runtimeSchema)) {
+ return value;
Review Comment:
Thanks, addressed in 85bd596278e. I added coverage for the same-schema
GenericRecord path, and also added a nullable-union GenericRecord roundtrip to
exercise the null return branch through public serializer behavior.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]