Hisoka-X commented on code in PR #9854:
URL: https://github.com/apache/seatunnel/pull/9854#discussion_r2349115726


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/TableSchema.java:
##########
@@ -92,4 +94,113 @@ public TableSchema copy() {
                 .primaryKey(primaryKey == null ? null : primaryKey.copy())
                 .build();
     }
+
+    /**
+     * Custom deserialization to handle compatibility with older versions.
+     *
+     * <p>In older versions (before 2.3.12), TableSchema directly contained 
columns field. In newer
+     * versions, TableSchema extends AbstractSchema which contains columns 
field.
+     *
+     * <p>This method ensures that old checkpoint data can be properly 
deserialized by using
+     * ObjectInputStream.GetField to read old version fields and properly 
initialize the parent
+     * class fields.
+     */
+    private void readObject(ObjectInputStream stream) throws IOException, 
ClassNotFoundException {

Review Comment:
   This is good code, but I'm not sure we need to merge it into our mainline. 
Cross-version checkpoint compatibility scenarios are minimal.



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