ARRAYS_ZIP
Introduced or updated: v1.2.690
Merges multiple arrays into a single array tuple.
Syntax
ARRAYS_ZIP( <array1> [, ...] )
Arguments
Arguments | Description |
---|---|
<arrayN> | The input ARRAYs. |
note
- The length of each array must be the same.
Return Type
Array(Tuple).
Examples
SELECT ARRAYS_ZIP([1, 2, 3], ['a', 'b', 'c']);
┌────────────────────────────────────────┐
│ arrays_zip([1, 2, 3], ['a', 'b', 'c']) │
├────────────────────────────────────────┤
│ [(1,'a'),(2,'b'),(3,'c')] │
└────────────────────────────────────────┘