Q: Presto identify unique values New to presto, I have a table with a column contains a lot key value pairs. I can extract each row's keys using `map_keys', but I am wondering is there a function to combine and list all unique keys in one row?

get all the keys

SELECT
    DISTINCT MAP_KEYS(col)
FROM tbl


what it looks like:

_col0
[key1, key2]
[key2, key3]

desired outputs:
_col0
[key1, key2, key3]


A: SELECT array_agg(DISTINCT k)
FROM tbl
CROSS JOIN UNNEST(map_keys(col)) AS t (k)

