Guosmilesmile commented on code in PR #11745: URL: https://github.com/apache/iceberg/pull/11745#discussion_r1890222771
########## flink/v1.18/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/SortKeySerializer.java: ########## @@ -325,9 +370,13 @@ public TypeSerializerSchemaCompatibility<SortKey> resolveSchemaCompatibility( return TypeSerializerSchemaCompatibility.incompatible(); } - // Sort order should be identical SortKeySerializerSnapshot newSnapshot = (SortKeySerializerSnapshot) newSerializer.snapshotConfiguration(); + if (newSnapshot.getCurrentVersion() == 1 && this.getCurrentVersion() == 2) { Review Comment: In version 18, the parameter for resolveSchemaCompatibility is TypeSerializer, and it needs to be obtained through SortKeySerializerSnapshot.snapshotConfiguration() to get the SortKeySerializerSnapshot. ########## flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/SortKeySerializer.java: ########## @@ -324,6 +369,10 @@ public TypeSerializerSchemaCompatibility<SortKey> resolveSchemaCompatibility( return TypeSerializerSchemaCompatibility.incompatible(); } + if (oldSerializerSnapshot.getCurrentVersion() == 1 && this.getCurrentVersion() == 2) { Review Comment: In version 19, the parameter for resolveSchemaCompatibility is TypeSerializerSnapshot, which can be used directly. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org