tzulitai commented on a change in pull request #7759: 
[FLINK-11485][FLINK-10897] POJO state schema evolution / migrate PojoSerializer 
to use new compatibility APIs
URL: https://github.com/apache/flink/pull/7759#discussion_r258754989
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeTypeSerializerUtil.java
 ##########
 @@ -62,4 +65,147 @@ public static void setNestedSerializersSnapshots(
                NestedSerializersSnapshotDelegate delegate = new 
NestedSerializersSnapshotDelegate(nestedSnapshots);
                
compositeSnapshot.setNestedSerializersSnapshotDelegate(delegate);
        }
+
+       /**
+        * Constructs an {@link IntermediateCompatibilityResult} with the given 
array of nested serializers and their
+        * corresponding serializer snapshots.
+        *
+        * <p>This result is considered "intermediate", because the actual 
final result is not yet built if it isn't
+        * defined. This is the case if the final result is supposed to be
+        * {@link 
TypeSerializerSchemaCompatibility#compatibleWithReconfiguredSerializer(TypeSerializer)},
 where
+        * construction of the reconfigured serializer instance should be done 
by the caller.
+        *
+        * <p>For other cases, i.e. {@link 
TypeSerializerSchemaCompatibility#compatibleAsIs()},
+        * {@link 
TypeSerializerSchemaCompatibility#compatibleAfterMigration()}, and
+        * {@link TypeSerializerSchemaCompatibility#incompatible()}, these 
results are considered final.
+        *
+        * @param newNestedSerializers the new nested serializers to check for 
compatibility.
+        * @param nestedSerializerSnapshots the associated nested serializers' 
snapshots.
+        *
+        * @return the intermediate compatibility result of the new nested 
serializers.
+        */
+       public static <T> IntermediateCompatibilityResult<T> 
constructIntermediateCompatibilityResult(
 
 Review comment:
   Yes, will add a unit test for this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to