linyanghao commented on code in PR #7628:
URL: https://github.com/apache/iceberg/pull/7628#discussion_r1264719063
##########
flink/v1.17/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -605,6 +659,56 @@ private static void commitChanges(
transaction.commitTransaction();
}
+ private static void commitChanges(
+ Table table,
+ String setLocation,
+ String setSnapshotId,
+ String pickSnapshotId,
+ List<TableChange> schemaChanges,
+ List<TableChange> propertyChanges) {
+ commitChanges(table, setSnapshotId, pickSnapshotId);
+
+ Transaction transaction = table.newTransaction();
+
+ if (setLocation != null) {
+ transaction.updateLocation().setLocation(setLocation).commit();
+ }
+
+ if (!schemaChanges.isEmpty()) {
+ UpdateSchema updateSchema = transaction.updateSchema();
+ FlinkAlterTableUtil.applySchemaChanges(updateSchema, schemaChanges);
+ updateSchema.commit();
Review Comment:
That's reasonable.
--
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]