Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink Common

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.

previous

pyflink.table.expressions.if_then_else

next

pyflink.table.expressions.with_columns

Show Source

Created using Sphinx 4.5.0.