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.expressions.if_then_else

pyflink.table.expressions.if_then_else#

if_then_else(condition: bool | Expression[bool], if_true, if_false) → 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

Added in version 1.12.0.

previous

pyflink.table.expressions.source_watermark

next

pyflink.table.expressions.coalesce

On this page
  • if_then_else()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.