Is not null

Supported in: Batch, Streaming

Returns true if the input is not null, can optionally treat empty strings as null.

Expression categories: Boolean

Declared arguments

  • Expression - no description
    Expression<AnyType>
  • optional Treat empty strings as null - no description
    Literal<Boolean>

Output type: Boolean

Examples

Example 1: Base case

Argument values:

  • Expression: empty string
  • Treat empty strings as null: true

Output: false


Example 2: Base case

Argument values:

  • Expression: null
  • Treat empty strings as null: null

Output: false


Example 3: Base case

Argument values:

  • Expression: 1
  • Treat empty strings as null: null

Output: true


Example 4: Base case

Argument values:

  • Expression: hello
  • Treat empty strings as null: null

Output: true