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


##########
flink-python/src/main/java/org/apache/flink/table/runtime/typeutils/serializers/python/RowDataSerializer.java:
##########
@@ -194,31 +193,33 @@ 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.fieldTypes)) {
+            RowDataSerializerSnapshot oldRowDataSerializerSnapshot =
+                    (RowDataSerializerSnapshot) oldSerializerSnapshot;
+            if (!Arrays.equals(types, oldRowDataSerializerSnapshot.types)) {
                 return TypeSerializerSchemaCompatibility.incompatible();
             }
 
             
CompositeTypeSerializerUtil.IntermediateCompatibilityResult<RowData>
                     intermediateResult =
                             
CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(
-                                    newRowSerializer.fieldSerializers,
+                                    
oldRowDataSerializerSnapshot.nestedSerializersSnapshotDelegate
+                                            .getNestedSerializerSnapshots(),
                                     nestedSerializersSnapshotDelegate
                                             .getNestedSerializerSnapshots());
 
             if (intermediateResult.isCompatibleWithReconfiguredSerializer()) {
-                RowDataSerializer reconfiguredCompositeSerializer = 
restoreSerializer();
+                org.apache.flink.table.runtime.typeutils.RowDataSerializer

Review Comment:
   Is that correct? This looks wrong.



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