JingsongLi commented on a change in pull request #16699:
URL: https://github.com/apache/flink/pull/16699#discussion_r683163489



##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/LinkedListSerializer.java
##########
@@ -186,12 +267,28 @@ public int getCurrentOuterSnapshotVersion() {
             return CURRENT_VERSION;
         }
 
+        @Override
+        protected void readOuterSnapshot(
+                int readOuterSnapshotVersion, DataInputView in, ClassLoader 
userCodeClassLoader) {
+            readVersion = readOuterSnapshotVersion;
+        }
+
+        @Override
+        protected OuterSchemaCompatibility resolveOuterSchemaCompatibility(
+                LinkedListSerializer<T> newSerializer) {
+            if (readVersion <= LAST_NULL_NOT_CHECKED_VERSION) {

Review comment:
       ```
   private boolean isCompatible() {
      return readVersion > LAST_NULL_NOT_CHECKED_VERSION || 
NullableSerializer.checkIfNullSupported(eleSer);
   }
   ```

##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/LinkedListSerializer.java
##########
@@ -186,12 +267,28 @@ public int getCurrentOuterSnapshotVersion() {
             return CURRENT_VERSION;
         }
 
+        @Override
+        protected void readOuterSnapshot(
+                int readOuterSnapshotVersion, DataInputView in, ClassLoader 
userCodeClassLoader) {
+            readVersion = readOuterSnapshotVersion;
+        }
+
+        @Override
+        protected OuterSchemaCompatibility resolveOuterSchemaCompatibility(
+                LinkedListSerializer<T> newSerializer) {
+            if (readVersion <= LAST_NULL_NOT_CHECKED_VERSION) {
+                return OuterSchemaCompatibility.COMPATIBLE_AFTER_MIGRATION;

Review comment:
       We could consider `NullableSerializer.checkIfNullSupported` too.

##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/LinkedListSerializer.java
##########
@@ -39,18 +39,27 @@
 @Internal
 public final class LinkedListSerializer<T> extends 
TypeSerializer<LinkedList<T>> {
 
+    // legacy, don't touch until we drop support for 1.9 savepoints
     private static final long serialVersionUID = 1L;
 
-    /** The serializer for the elements of the list. */
+    // The serializer for the elements of the list.
     private final TypeSerializer<T> elementSerializer;
 
+    // When legacy mode is enabled serializer will not check for null values.
+    private final boolean legacyModeEnabled;

Review comment:
       `nullSafe`?




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