v.22.2Improvement
Added support for casting from Map to Array of Tuples in ClickHouse
Added support for cast fromMap(Key, Value)toArray(Tuple(Key, Value)). #33794 (Maksim Kita).
Why it matters
This feature enables users to convertMap data types into an Array of Tuple pairs, facilitating easier manipulation and processing of map entries as array elements. It improves interoperability and data transformation flexibility within queries.How to use it
Users can apply this feature by using theCAST expression to convert a Map(Key, Value) column or expression to Array(Tuple(Key, Value)), for example:SELECT CAST(your_map_column AS Array(Tuple(KeyType, ValueType))) FROM your_table;