Subtract multiple expressions

Supported in: Batch, Streaming

Calculates the difference between a number and all input columns.

Expression categories: Numeric

Declared arguments

  • Expressions list - List of expressions to be used for subtraction.
    List<Expression<Numeric>>
  • Value to be subtracted - Expression to subtract from.
    Expression<Numeric>

Output type: Numeric

Examples

Example 1: Base case

Argument values:

  • Expressions list: [col_b, col_c]
  • Value to be subtracted: col_a
col_acol_bcol_cOutput
5320
240-2
-2-4-24

Example 2: Base case

Argument values:

  • Expressions list: [col_b]
  • Value to be subtracted: col_a
col_acol_bOutput
nullnullnull
1nullnull
null10null