jerryshao commented on code in PR #9481:
URL: https://github.com/apache/gravitino/pull/9481#discussion_r2638566246


##########
core/src/main/java/org/apache/gravitino/catalog/ManagedTableOperations.java:
##########
@@ -225,13 +227,13 @@ private TableEntity applyChanges(TableEntity 
oldTableEntity, TableChange... chan
 
     for (TableChange change : tableChanges) {
       if (change instanceof TableChange.RenameTable rename) {
-        if (rename.getNewSchemaName().isPresent()) {
-          throw new IllegalArgumentException(
-              "Gravitino managed table doesn't support renaming "
-                  + "the table across schemas for now");
-        }
-
+        Namespace oldNs = oldTableEntity.namespace();
         newName = rename.getNewName();
+        newNs =
+            rename
+                .getNewSchemaName()
+                .map(s -> NamespaceUtil.ofTable(oldNs.level(0), 
oldNs.level(1), s))
+                .orElse(oldNs);

Review Comment:
   This will be verified when doing the actual entity updating operation in the 
entity store.



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