dawidwys commented on code in PR #21635:
URL: https://github.com/apache/flink/pull/21635#discussion_r1081536771


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/RowDataSerializer.java:
##########
@@ -328,26 +327,27 @@ public void readSnapshot(int readVersion, DataInputView 
in, ClassLoader userCode
         @Override
         public RowDataSerializer restoreSerializer() {
             return new RowDataSerializer(
-                    previousTypes,
-                    
nestedSerializersSnapshotDelegate.getRestoredNestedSerializers());
+                    types, 
nestedSerializersSnapshotDelegate.getRestoredNestedSerializers());
         }
 
         @Override
         public TypeSerializerSchemaCompatibility<RowData> 
resolveSchemaCompatibility(
-                TypeSerializer<RowData> newSerializer) {
-            if (!(newSerializer instanceof RowDataSerializer)) {
+                TypeSerializerSnapshot<RowData> oldSerializerSnapshot) {
+            if (!(oldSerializerSnapshot instanceof RowDataSerializerSnapshot)) 
{
                 return TypeSerializerSchemaCompatibility.incompatible();
             }
 
-            RowDataSerializer newRowSerializer = (RowDataSerializer) 
newSerializer;
-            if (!Arrays.equals(previousTypes, newRowSerializer.types)) {
+            RowDataSerializerSnapshot oldRowDataSerializerSnapshot =
+                    (RowDataSerializerSnapshot) oldSerializerSnapshot;
+            if (!Arrays.equals(types, oldRowDataSerializerSnapshot.types)) {
                 return TypeSerializerSchemaCompatibility.incompatible();
             }
 
             
CompositeTypeSerializerUtil.IntermediateCompatibilityResult<RowData>
                     intermediateResult =
                             
CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(
-                                    newRowSerializer.fieldSerializers,
+                                    
oldRowDataSerializerSnapshot.nestedSerializersSnapshotDelegate

Review Comment:
   shouldn't the order of serializers be reversed here?



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