pyflink.table.expressions.coalesce#
- coalesce(*args) pyflink.table.expression.Expression [source]#
Returns the first argument that is not NULL.
If all arguments are NULL, it returns NULL as well. The return type is the least restrictive, common type of all of its arguments. The return type is nullable if all arguments are nullable as well.
Examples:
>>> coalesce(None, "default") # Returns "default" >>> # Returns the first non-null value among f0 and f1, >>> # or "default" if f0 and f1 are both null >>> coalesce(col("f0"), col("f1"), "default")
- Parameters
args – the input expressions.
New in version 1.12.0.