v.23.4Improvement

Function mapFromArrays Supports Map Type Input

Function mapFromArrays supports Map type as an input. #48207 (李扬).
mapFromArrays function now supports the Map type as input.

Why it matters

This feature allows users to pass <code>Map</code> type arguments directly into the <code>mapFromArrays</code> function, enhancing flexibility and compatibility when constructing maps from arrays and maps. It simplifies the creation and manipulation of map data structures in queries by accepting this native type.

How to use it

Users can now call the <code>mapFromArrays</code> function with <code>Map</code> type inputs in their SQL queries. For example:

SELECT mapFromArrays([1, 2], map('a', 10, 'b', 20))

This allows combining arrays and maps as inputs to generate new map outputs.