xinyiZzz commented on code in PR #31001:
URL: https://github.com/apache/doris/pull/31001#discussion_r1495637907


##########
fe/fe-core/src/main/java/org/apache/doris/plsql/functions/InMemoryFunctionRegistry.java:
##########
@@ -251,6 +252,20 @@ public void addUserProcedure(Create_procedure_stmtContext 
ctx) {
         procMap.put(procedureName.toString(), ctx);
     }
 
+    @Override
+    public void removeUserProcedure(Drop_procedure_stmtContext ctx) {
+        FuncNameInfo procedureName = new FuncNameInfo(
+                
exec.logicalPlanBuilder.visitMultipartIdentifier(ctx.multipartIdentifier()));
+        if (builtinFunctions.exists(procedureName.toString())) {
+            exec.info(ctx, procedureName.toString() + " is a built-in function 
which cannot be removed.");
+            return;
+        }
+        if (trace) {
+            trace(ctx, "DROP PROCEDURE " + procedureName.toString());
+        }
+        procMap.remove(procedureName.toString());

Review Comment:
   Consider using `InMemoryFunctionRegistry.remove`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to