roryqi commented on code in PR #13316:
URL: https://github.com/apache/gravitino/pull/13316#discussion_r4046726948


##########
core/src/main/java/org/apache/gravitino/hook/TableHookDispatcher.java:
##########
@@ -116,9 +121,15 @@ public Table alterTable(NameIdentifier ident, 
TableChange... changes)
     Table alteredTable = dispatcher.alterTable(ident, changes);
 
     if (lastRenameChange != null) {
-      // todo: support rename across different schemas
+      // The rename may also move the table to another schema.
+      NameIdentifier newIdent =
+          NameIdentifierUtil.ofTable(
+              ident.namespace().level(0),
+              ident.namespace().level(1),
+              newSchemaName,
+              lastRenameChange.getNewName());
       AuthorizationUtils.authorizationPluginRenamePrivileges(

Review Comment:
   could u add a UT for RangerAuthorizationPlugin to test this case? I don't 
have other comments.



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