Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink Table
  • Expressions
  • pyflink.table.expression.Expression.if_null

pyflink.table.expression.Expression.if_null#

Expression.if_null(null_replacement) → 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.

Added in version 1.12.0.

previous

pyflink.table.expression.Expression.then

next

pyflink.table.expression.Expression.is_null

On this page
  • Expression.if_null()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.