Syntax
Parameters
any_map: the MAP value from which you want to retrieve keys.
Return value
The return value is in the format ofarray<keyType>. The element type in the array matches the key type in the map.
If the input is NULL, NULL is returned. If a key or value in the MAP value is NULL, NULL is processed as a normal value and contained in the result.
Examples
Query MAP data from a native table
From v3.1 onwards, the database supports defining MAP columns when you create a table. This example uses tabletest_map, which contains the following data:
col_map column.
Query MAP data from data lake
This example uses Hive tablehive_map, which contains the following data:
col_map column.