MAP_KEYS
Description
Extracts the keys from a given map into an ARRAY of the corresponding type.
Syntax
MAP_KEYS(<map>)
Parameters
<map>MAPtype, the input map content.
Return Value
Extracts the keys from a given map into an ARRAY of the corresponding type.
Examples
- Regular parameters
select map_keys(map()),map_keys(map(1, "100", 0.1, 2, null, null));+-----------------+---------------------------------------------+
| map_keys(map()) | map_keys(map(1, "100", 0.1, 2, null, null)) |
+-----------------+---------------------------------------------+
| [] | [1.0, 0.1, null] |
+-----------------+---------------------------------------------+ - NULL parameters
select map_keys(NULL);+----------------+
| map_keys(NULL) |
+----------------+
| NULL |
+----------------+