ARRAY_MERGE_FUNC
All functions > ROW > ARRAY_MERGE_FUNC
Merges multiple arrays of rows element-wise into a single array of combined rows
Syntax
ARRAY_MERGE_FUNC(expressions)
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
expressions | ARRAYROW | Yes | Array of array-of-row expressions to merge |
Returns
ARRAY[ROW] - Array of rows where each row contains merged fields from corresponding positions
Notes
- Requires at least 2 arrays of rows to merge
- Merges rows element-wise by position (first with first, second with second, etc.)
- If arrays have different lengths, shorter arrays are padded with NULL values
- All field names must be unique across all rows
- Result array length equals the longest input array