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 DataFrame
  • PyFlink Multimodal
  • PyFlink DataStream
  • PyFlink Common

pyflink.table.expression.Expression.if_null#

Expression.if_null(null_replacement) → pyflink.table.expression.Expression[source]#

Returns null_replacement if the given expression is null; otherwise the expression is returned.

This function returns a data type that is very specific in terms of nullability. The returned type is the common type of both arguments but only nullable if the null_replacement is nullable.

The function allows to pass nullable columns into a function or table that is declared with a NOT NULL constraint.

e.g. col(“nullable_column”).if_null(5) returns never null.

New in version 1.12.0.

previous

pyflink.table.expression.Expression.then

next

pyflink.table.expression.Expression.is_null

Show Source

Created using Sphinx 4.5.0.