davidradl commented on code in PR #28161:
URL: https://github.com/apache/flink/pull/28161#discussion_r3257818750


##########
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:
   can we add a test to test this return?



-- 
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]

Reply via email to