MapReduce服务 MRS-SHOW FUNCTIONS:示例

时间:2023-11-01 16:25:29

示例

SHOW functions; --使用LIKE子句show functions like 'boo_%'; Function | Return Type | Argument Types | Function Type | Deterministic | Description ----------|-------------|----------------|---------------|---------------|------------- bool_and | boolean     | boolean        | aggregate     | true          |              bool_or  | boolean     | boolean        | aggregate     | true          |             (2 rows)--如果匹配字符串中有字符与通配符冲突,可以指定转义字符来标识,示例为查询default这个schema下,table_name前缀为"t_" 的所有table,转义字符为"\":SHOW FUNCTIONS LIKE 'array\_%' escape '\';  Function     | Return Type |         Argument Types          | Function Type | Deterministic |                                              Description                                               | Variable Arity | Built In -----------------|-------------|---------------------------------|---------------|---------------|--------------------------------------------------------------------------------------------------------|----------------|---------- array_agg       | array(T)    | T                               | aggregate     | true          | return an array of values                                                                              | false          | true      array_contains  | boolean     | array(T), T                     | scalar        | true          | Determines whether given value exists in the array                                                     | false          | true      array_distinct  | array(E)    | array(E)                        | scalar        | true          | Remove duplicate values from the given array                                                           | false          | true      array_except    | array(E)    | array(E), array(E)              | scalar        | true          | Returns an array of elements that are in the first array but not the second, without duplicates.       | false          | true      array_intersect | array(E)    | array(E), array(E)              | scalar        | true          | Intersects elements of the two given arrays                                                            | false          | true      array_join      | varchar     | array(T), varchar               | scalar        | true          | Concatenates the elements of the given array using a delimiter and an optional string to replace nulls | false          | true      array_join      | varchar     | array(T), varchar, varchar      | scalar        | true          | Concatenates the elements of the given array using a delimiter and an optional string to replace nulls | false          | true      array_max       | T           | array(T)                        | scalar        | true          | Get maximum value of array                                                                             | false          | true      array_min       | T           | array(T)                        | scalar        | true          | Get minimum value of array                                                                             | false          | true      array_position  | bigint      | array(T), T                     | scalar        | true          | Returns the position of the first occurrence of the given value in array (or 0 if not found)           | false          | true      array_remove    | array(E)    | array(E), E                     | scalar        | true          | Remove specified values from the given array                                                           | false          | true      array_sort      | array(E)    | array(E)                        | scalar        | true          | Sorts the given array in ascending order according to the natural ordering of its elements.            | false          | true      array_sort      | array(T)    | array(T), function(T,T,integer) | scalar        | true          | Sorts the given array with a lambda comparator.                                                        | false          | true      array_union     | array(E)    | array(E), array(E)              | scalar        | true          | Union elements of the two given arrays                                                                 | false          | true     --查看所有JAVA和JDBC函数SHOW external functions;  Function                  |   Owner   ----------------------------|----------- example.namespace02.repeat | admintest  hetu.default.add_two       | admintest (2 rows)--查看给定函数的定义信息SHOW external function example.namespace02.repeat;          External Function           -------------------------------------- External FUNCTION example.namespace02.repeat (     s varchar,                            n integer                          )                                     RETURNS varchar                       COMMENT ''                            LANGUAGE JDBC                         NOT DETERMINISTIC                     CALLED ON NULL INPUT                  FUNCPROPERTIES (                         owner = 'admintest'                )
support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_249046.html