Scalar functions

Conditional functions

Function NameDescription
case()Evaluates a list of predicates and returns the first result expression whose predicate is satisfied.

case()

Evaluates a list of predicates and returns the first result expression whose predicate is satisfied.

Arguments

  • predicate: An expression that evaluates to a boolean value.
  • then: An expression that gets evaluated and its value is returned from the function if predicate is the first predicate that evaluates to true.
  • else: An expression that gets evaluated and its value is returned from the function if neither of the predicate evaluate to true.

Returns

The value of the first then whose predicate evaluates to true, or the value of else if neither of the predicates are satisfied.

Example

case(predicate, then, else, ...)