Source: https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-functions/ Documentation version: v5.3.2 # SHOW FUNCTION / FUNCTIONS command The SHOW FUNCTIONS command displays all the functions in the current schema. The `SHOW FUNCTION ` command displays the functions that match the specified function name. If the current user does not have `USAGE` on the current schema, built-in functions are still returned, but user-defined functions in that schema are omitted. For more information, see [Schema access control](https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authorization/schema-access-control/). The following table describes the returned information: | Column | Description | `name` | The name of the function. | `signature` | The signature of the function. If the function is variadic, the last input parameter is followed by the ellipsis (`...`) symbol. | `comment` | The description of the function. To view additional columns including the function `category` and `null_behavior`, use the `VERBOSE` option. See [Syntax](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-functions/#syntax). When the `VERBOSE` option is used, the following additional columns are returned: | Column | Description | `category` | The category of the function. Valid values are `SCALAR`, `AGGREGATE`, and `GQL UDF`. - `SCALAR` functions return a single value. - `AGGREGATE` functions return a single value based on a set of input values. - `GQL UDF` functions are user-defined functions written in GQL. | `null_behavior` | The NULL handling behavior of the function. Valid values are `DEFAULT` (returns NULL if any argument is NULL), `CUSTOM` (custom NULL handling), and `IGNORE` (ignores NULL values in aggregation). ## Syntax diagramsource show_functions_command show_specific_function_statement optional_function_category ```` show_functions_command ::= 'SHOW' optional_function_category 'FUNCTIONS' 'VERBOSE'? show_specific_function_statement ::= 'SHOW' optional_function_category 'FUNCTION' function_name 'VERBOSE'? optional_function_category ::= 'SCALAR' | 'AGGREGATE' | 'ALL' | 'USER DEFINED' | 'GQL USER DEFINED' ```` - `optional_function_category`: Filters functions by category. If omitted, all functions are shown. - `VERBOSE`: If specified, the output includes the additional `category` and `null_behavior` columns. ## Parameters ### `function_name` The name of the function for which to display information. You can specify a regular expression to match multiple functions. The regular expression must be enclosed in double quotes (`"`) or backticks (```). For example, `SHOW FUNCTION "collect.*"` matches all functions whose names start with `collect`. To view all functions, use the `SHOW FUNCTIONS` command. ## Examples ### Show all functions ```` SHOW FUNCTIONS ```` Return: ```` +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+ | name | signature | comment | +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+ | * | *(VECTOR, FLOAT) -> VECTOR | Multiply vector by scalar | ... ```` ### Show functions with VERBOSE option ```` SHOW FUNCTIONS VERBOSE ```` Return: ```` +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+-----------+---------------+ | name | signature | comment | category | null_behavior | +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+-----------+---------------+ | * | *(VECTOR, FLOAT) -> VECTOR | Multiply vector by scalar | SCALAR | DEFAULT | ... ```` ### Show functions with category ```` SHOW SCALAR FUNCTIONS VERBOSE ```` Return: ```` +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+----------+---------------+ | name | signature | comment | category | null_behavior | +----------------------------------------------------+--------------------------------------------------------------------------+-------------------------------------------------------+----------+---------------+ | * | *(VECTOR, FLOAT) -> VECTOR | Multiply vector by scalar | SCALAR | DEFAULT | | | *(VECTOR, INT64) -> VECTOR | | | | | + | +(VECTOR, FLOAT) -> VECTOR | Add scalar to vector | SCALAR | DEFAULT | | | +(VECTOR, INT64) -> VECTOR | | | | | | +(VECTOR, VECTOR) -> VECTOR | Add two vectors | SCALAR | DEFAULT | | - | -(VECTOR, FLOAT) -> VECTOR | Subtract scalar from vector | SCALAR | DEFAULT | | | -(VECTOR, INT64) -> VECTOR | | | | | | -(VECTOR, VECTOR) -> VECTOR | Subtract two vectors | SCALAR | DEFAULT | | / | /(VECTOR, FLOAT) -> VECTOR | Divide vector by scalar | SCALAR | DEFAULT | | | /(VECTOR, INT64) -> VECTOR | | | | | abs | abs(VECTOR) -> VECTOR | Absolute value of vector elements | SCALAR | DEFAULT | ... ```` ### Show functions matching the specified function name ```` SHOW FUNCTION mod ```` Return: ```` +------+----------------------------------+---------+ | name | signature | comment | +------+----------------------------------+---------+ | mod | mod(DECIMAL, DECIMAL) -> DECIMAL | Modulus | | | mod(DOUBLE, DOUBLE) -> DOUBLE | | | | mod(FLOAT, FLOAT) -> FLOAT | | | | mod(INT16, INT16) -> INT16 | | | | mod(INT32, INT32) -> INT32 | | | | mod(INT64, INT64) -> INT64 | | | | mod(INT8, INT8) -> INT8 | | | | mod(UINT16, UINT16) -> UINT16 | | | | mod(UINT32, UINT32) -> UINT32 | | | | mod(UINT64, UINT64) -> UINT64 | | | | mod(UINT8, UINT8) -> UINT8 | | +------+----------------------------------+---------+ ```` ### Show functions matching the specified regular expression ```` SHOW FUNCTION "collect.*" ```` Return: ```` +--------------+-------------------------------------+---------------------------+ | name | signature | comment | +--------------+-------------------------------------+---------------------------+ | collect | collect(BOOL) -> LIST | Collect values from group | | | collect(DATE) -> LIST | | | | collect(DECIMAL) -> LIST | | | | collect(DOUBLE) -> LIST | | | | collect(DURATION) -> LIST | | | | collect(EDGE) -> LIST | | ... | | collect(ZONEDTIME) -> LIST | | | collect_list | collect_list(BOOL) -> LIST | Collect values from group | | | collect_list(DATE) -> LIST | | | | collect_list(DECIMAL) -> LIST | | ... +--------------+-------------------------------------+---------------------------+ ````