luoyuxia commented on code in PR #3523:
URL: https://github.com/apache/fluss/pull/3523#discussion_r3563994651


##########
fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java:
##########
@@ -114,6 +115,22 @@ public void alterTable(TablePath tablePath, 
List<TableChange> tableChanges, Cont
             throws TableNotExistException {
         try {
             Table table = paimonCatalog.getTable(toPaimon(tablePath));
+            if (tableChanges.stream()
+                    .anyMatch(
+                            tableChange ->
+                                    (tableChange instanceof 
TableChange.SetOption

Review Comment:
   nit: 
   When the changes contain `SetOption("paimon.path", newPath)`, we can compare 
`newPath` with the existing Paimon table location: 
   - If both paths resolve to the same Paimon `Path`, treat it as a no-op
   - If the paths are different, reject the change as the current code
   
   This also handles the case where `paimon.path` and 
`table.datalake.enabled=true` are set in the same Fluss ALTER. The Paimon table 
is first created at `newPath`, and the subsequent 
`PaimonLakeCatalog.alterTable()` sees that the existing location is already 
equal to `newPath`, so it can safely skip the duplicated path change instead of 
failing the operation.



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