Data connectivity & integrationPipeline Builder ExpressionsGreatest

Greatest

Supported in: Batch, Streaming

Computes the greatest value amongst all input columns, skipping null values.

Expression categories: Numeric

Declared arguments

  • Expressions - List of columns from which to compute greatest value.
    List<Expression<T>>

Type variable bounds: T accepts ComparableType

Output type: T

Examples

Example 1: Base case

Argument values:

  • Expressions: [a, b, c]
abcOutput
1233
1323
3213

Example 2: Null case

Description: Returns null if values of all inputs are null. Argument values:

  • Expressions: [a, b]
abOutput
nullnullnull

Example 3: Null case

Description: Any null values are ignored for comparison purposes. Argument values:

  • Expressions: [a, b]
abOutput
null-2147483648-2147483648
null00
null21474836472147483647