Updated on 2024-08-19 GMT+08:00

Collection Functions

Description

Table 1 Collection functions

Collection Function

Description

CARDINALITY(array)

Returns the number of elements in the array.

array '[' INT ']'

Returns the element at the INT position in the array. The index starts at 1.

ELEMENT(array)

Returns the unique element in the array (with a base of 1); returns NULL if the array is empty; throws an exception if there are multiple elements in the array.

CARDINALITY(map)

Returns the number of entries in the map.

map '[' value ']'

Returns the value corresponding to the specified key in the map.