mchades commented on code in PR #11189:
URL: https://github.com/apache/gravitino/pull/11189#discussion_r3302796996


##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/catalog/BaseCatalog.java:
##########
@@ -261,16 +327,32 @@ public void renameTable(ObjectPath tablePath, String 
newTableName, boolean ignor
 
     if (catalog().asTableCatalog().tableExists(identifier)) {
       throw new TableAlreadyExistException(
-          catalogName(), ObjectPath.fromString(tablePath.getDatabaseName() + 
newTableName));
+          catalogName(), new ObjectPath(tablePath.getDatabaseName(), 
newTableName));
+    }
+    ViewCatalog viewCatalog = null;

Review Comment:
   The logic for `renameTable` is quite complex. We can attempt to directly 
rename the table/view and delegate the tableExist check to the server. (just 
like what the `dropTable` does)



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