lexluo09 opened a new issue, #16973:
URL: https://github.com/apache/doris/issues/16973

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Description
   
   Description:
        When you create a custom function, it can only be used within in one 
database. It cannot be used in other database. When there are many databases, 
it needs to create function one by one.
   
   
   
![image](https://user-images.githubusercontent.com/39718951/220253091-e68ff19a-af61-45dd-9650-8bf0fd68ca7d.png)
   
   
   ### Solution
   
   1、 When a function is created or deleted, add the global keyword.
   
   CREATE [GLOBAL] [AGGREGATE] [ALIAS] FUNCTION function_name    (arg_type [, 
...])    [RETURNS ret_type]    [INTERMEDIATE inter_type]    [WITH 
PARAMETER(param [,...]) AS origin_function]    [PROPERTIES ("key" = "value" [, 
...]) ]
   
   DROP [GLOBAL] FUNCTION function_name     (arg_type [, ...])
   
   2、When a function is created or deleted, if it is global with the keyword, 
all databases under the current catalog are obtained and the corresponding 
create and drop operations are performed.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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