ποΈ cardinality
Returns the number of elements in a MAP value. MAP is an unordered collection of key-value pairs, for example, {"a"2}. One key-value pair constitutes one element. {"a"2} contains two elements.
ποΈ distinct_map_keys
Removes duplicate keys from a map, because keys in a map must be unique in terms of semantics. This function keeps only the last value for identical keys, called LAST WIN. This function is used when querying MAP data from external tables if there are duplicate keys in maps. StarRocks internal tables natively remove duplicate keys in maps.
ποΈ element_at
Returns the value for the specified key from a key-value pair of a map. If any input parameter is NULL or if the key does not exist in the map, the result is NULL.
ποΈ map_apply
Applies a Lambda expression to the keys and values of the original Map and generates a new Map. This function is supported from v3.0.
ποΈ map_concat
Returns the union of the input maps. If a key is found in multiple maps, this function keeps only the last value among these maps, called LAST WIN. For example, SELECT map_concat(map{1'4'}); returns {1:"4"}.
ποΈ map_filter
Filters key-value pairs in a map by applying a Boolean array or a Lambda expression to each key-value pair. The pair that evaluates to true is returned.
ποΈ map_from_arrays
Creates a MAP value from the given pair of key item array and value item array.
ποΈ map_keys
Returns an array of all the keys in the specified map.
ποΈ map_size
Returns the number of elements in a MAP value. MAP is an unordered collection of key-value pairs, for example, {"a"2}. One key-value pair constitutes one element, for example, {"a"2} contains two elements.
ποΈ map_values
Returns an array of all the values in the specified map.
ποΈ transform_keys
Transforms keys in a map using a Lambda expression and produces a new key for each entry in the map.
ποΈ transform_values
Transforms values in a map using a Lambda expression and produces a new value for each entry in the map.