pyflink.table.expressions.if_then_else#
- if_then_else(condition: Union[bool, pyflink.table.expression.Expression[bool]], if_true, if_false) pyflink.table.expression.Expression [source]#
Ternary conditional operator that decides which of two other expressions should be evaluated based on a evaluated boolean condition.
e.g. if_then_else(col(“f0”) > 5, “A”, “B”) leads to “A”
- Parameters
condition – condition boolean condition
if_true – expression to be evaluated if condition holds
if_false – expression to be evaluated if condition does not hold
New in version 1.12.0.