How do I check if a map has no keys in Presto? If I have a way to check if an array is empty, I can use the map_keys
function to determine if the map is empty.
You can use the cardinality
function: https://prestodb.io/docs/current/functions/array.html#cardinality
select cardinality(array[]) = 0;
_col0
-------
true
(1 row)