Max¶
Returns the largest value among the given parameters or inputs, folding ARRAY inputs element-by-element.
Without parameters, Max selects the maximum across all available
inputs. When parameters are given, it chooses among those parameters
only.
An ARRAY input is folded element-by-element — Max compares array
contents, never an array as a whole — so scalars and arrays mix freely
in one call (e.g. Max(5, :int_array)), and
GetCDMTableId(@idx, :key)[] => Max() yields the maximum of all matched
values. The element type drives the comparison; when every input is an
ARRAY the output type defers to the destination field.
Parameters¶
- N —
candidatesOptional — accepts: field, DATE, FLOAT, INT, STRING -
The Nth candidate value. May be a field reference (scalar or ARRAY) or a static value.
Input type¶
DATEFLOATINTSTRINGARRAY
Output type¶
same-as-input
Requires¶
- All parameter types and (scalar) input types must be identical; ARRAY element types must match too.
Examples¶
Max across all inputs
Two field references
Field reference vs. static value
Lexicographic max of strings
Maximum of a collected ARRAY