SHOW FUNCTIONS Enterprise
Returns the list of user-defined functions (UDFs) after applying an optional pattern.
SyntaxSHOW FUNCTIONS
[ AT { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> ]
[ AS OF <timestamp> ]
[ LIKE { <pattern> } ]
To run SHOW FUNCTIONS, users need the USAGE privilege on the Arctic catalog and SELECT privilege on the catalog or folder where the UDF exists.
Parameters
AT { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> String Optional
Specifies the reference at which the UDFs exist. When this parameter is omitted, the current reference is used.
REF
: Identifies a specific branch, tag, or commit.BRANCH
: Identifies a specific branch.TAG
: Identifies a specific tag.COMMIT
: Identifies a specific commit. Commit hashes must be enclosed in double quotes (for example,“ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”
.
AS OF <timestamp> String Optional
Changes the commit reference point to the provided timestamp. Can only be applied to REF
, BRANCH
, and TAG
. <timestamp>
may be any SQL expression that resolves to a single timestamp type value, for example: CAST( DATE_SUB(CURRENT_DATE,1) AS TIMESTAMP )
or TIMESTAMP '2022-07-01 01:30:00.000'
.
[ LIKE { <pattern> } ] Optional
A LIKE
pattern that is used to filter the results of the statement. The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.
Examples
Create test UDFsCREATE FUNCTION hello() RETURNS VARCHAR RETURN 'Hello World!';
CREATE FUNCTION teapot() RETURNS VARCHAR RETURN '418 I am a teapot';
SHOW FUNCTIONS;
-- hello
-- teapot
SHOW FUNCTIONS LIKE 'hello';
-- hello
SHOW FUNCTIONS LIKE 't%';
-- teapot