- Categories:
MAP_SIZE¶
Returns the size of a MAP.
Syntax¶
MAP_SIZE( <map> )
Arguments¶
map
The input map.
Returns¶
Returns the number of entries in the map.
Examples¶
Determine the number of entries in a map:
SELECT MAP_SIZE({'a':1,'b':2,'c':3}::MAP(VARCHAR,NUMBER))
AS map_size;
+----------+
| MAP_SIZE |
|----------|
| 3 |
+----------+