Skip to main content

SHOW-CREATE-FUNCTION

Description​

This statement is used to show the creation statement of a user-defined function

Syntax​

SHOW CREATE [ GLOBAL ] FUNCTION <function_name>( <arg_type> ) [ FROM <db_name> ];

Required Parameters​

1. <function_name>

The name of the custom function that you want to query for the creation statement.

2. <arg_type>

The parameter list of the custom function that needs to be queried for the creation statement.

Parameter list location you need to enter the data type of the location parameter

Optional Parameters​

1.GLOBAL

GLOBAL is an optional parameter.

If GLOBAL is set, the function is searched for globally and deleted.

If GLOABL is not entered, the function is searched for in the current database and deleted.

2.<db_name>

FROM db_name indicates that the custom function is queried from the specified database

Return Value​

ColumnDescription
SYMBOLFunction package name
FILEjar package path
ALWAYS_NULLABLEWhether the result can be NULL
TYPEFunction type

Access Control Requirements​

The user who executes this SQL command must have at least the following permissions:

PrivilegeObjectNotes
SHOW_PRIVFunctionYou need to have the show permission on this function

Examples​

SHOW CREATE FUNCTION add_one(INT)
| Function Signature | Create Function
+--------------------+-------------------------------------------------------
| add_one(INT) | CREATE FUNCTION add_one(INT) RETURNS INT PROPERTIES (
"SYMBOL"="org.apache.doris.udf.AddOne",
"FILE"="file:///xxx.jar",
"ALWAYS_NULLABLE"="true",
"TYPE"="JAVA_UDF"
); |
+--------------------+-------------------------------------------------------