sumMapWithOverflow
sumMapWithOverflow
Introduced in: v20.1
Totals a value array according to the keys specified in the key array. Returns a tuple of two arrays: keys in sorted order, and values summed for the corresponding keys.
It differs from the sumMap function in that it does summation with overflow - i.e. returns the same data type for the summation as the argument data type.
Note
- Passing a tuple of key and value arrays is identical to passing an array of keys and an array of values.
- The number of elements in
keyandvaluemust be the same for each row that is totaled.
Syntax
Arguments
Returned value
Returns a tuple of two arrays: keys in sorted order, and values summed for the corresponding keys. Tuple(Array, Array)
Examples
Array syntax demonstrating overflow behavior
Tuple syntax with same result
See Also