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


##########
core/src/main/java/org/apache/gravitino/hook/FunctionHookDispatcher.java:
##########
@@ -108,6 +110,11 @@ public Function alterFunction(NameIdentifier ident, 
FunctionChange... changes)
 
   @Override
   public boolean dropFunction(NameIdentifier ident) {
-    return dispatcher.dropFunction(ident);
+    boolean dropped = dispatcher.dropFunction(ident);
+    if (dropped) {
+      AuthorizationUtils.authorizationPluginRemovePrivileges(

Review Comment:
   Function drops now send a `FUNCTION` removal to the catalog authorization 
plugin. The shipped Ranger HadoopSQL provider only translates `SCHEMA`, 
`TABLE`, and `COLUMN`, so this throws after `dispatcher.dropFunction()` has 
already committed the metadata deletion. The client therefore receives an error 
even though the function is gone. Please keep the JCasbin name-to-ID 
invalidation, but skip unsupported `FUNCTION` pushdown or make this callback 
capability-aware, and cover a Ranger-enabled catalog.



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