mxm commented on code in PR #18517:
URL: https://github.com/apache/iceberg/pull/18517#discussion_r4311658365


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableMetadataCache.java:
##########
@@ -266,17 +271,37 @@ private CacheItem(
         boolean tableExists,
         Set<String> branches,
         Map<Integer, Schema> tableSchemas,
+        int currentSchemaId,
         Map<Integer, PartitionSpec> specs,
         int inputSchemaCacheMaximumSize) {
       this.createdTimestampMillis = createdTimestampMillis;
       this.tableExists = tableExists;
       this.branches = branches;
-      this.tableSchemas = tableSchemas;
+      this.tableSchemas = orderSchemas(tableSchemas, currentSchemaId);

Review Comment:
   I wonder whether we should move the ordering to TableUpdater. The cache 
shouldn't be responsible for ordering schemas.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to