SQL
Map Type
`MAP`s are similar to `STRUCT`s in that they are an ordered list of “entries” where a key maps to a value. However, `MAP`s do not need to have the same keys present for each row, and thus are suitable for other use cases. `MAP`s are useful when the schema is unknown beforehand or when the schema varies per row; their flexibility is a key differentiator.  
`MAP`s must have a single type for all keys, and a single type for all values. Keys and values can be any type, and the type of the keys does not need to match the type of the values (e.g., a `MAP` of `VARCHAR` to `INT` is valid). `MAP`s may not have duplicate keys. `MAP`s return an empty list if a key is not found rather than throwing an error as structs do.  
In contrast, `STRUCT`s must have string keys, but each key may have a value of a different type. See the [data types overview](#docs:sql:data_types:overview) for a comparison between nested data types.  
To construct a `MAP`, use the bracket syntax preceded by the `MAP` keyword.