v.20.1New Feature
Add arrayZip function for combining multiple arrays into tuples
Add arrayZip function which allows to combine multiple arrays of equal lengths into one array of tuples. #8149 (Winter Zhang)Why it matters
ThearrayZip function addresses the need to merge arrays element-wise, enabling users to work with grouped elements from multiple arrays as tuples. This simplifies data transformation and processing tasks where parallel array elements need to be combined.How to use it
Use thearrayZip function by passing multiple arrays of the same length as arguments. It returns an array where each element is a tuple consisting of elements from the input arrays at the corresponding position. For example:SELECT arrayZip([1, 2, 3], ['a', 'b', 'c'])This returns: [(1, 'a'), (2, 'b'), (3, 'c')].