String contains

Supported in: Batch, Faster, Streaming

Expression categories: Boolean, String

Declared arguments

  • Expression: Expression to compare.
    Expression<String>
  • Ignore case: Boolean to decide if comparison should be case-sensitive or not.
    Literal<Boolean>
  • Value: Value to compare against.
    Expression<String>

Output type: Boolean

Examples

Example 1: Base case

Argument values:

  • Expression: ... Hello world
  • Ignore case: false
  • Value: hello

Output: false


Example 2: Base case

Argument values:

  • Expression: ... Hello world
  • Ignore case: false
  • Value: Hello

Output: true


Example 3: Base case

Argument values:

  • Expression: ... Hello world
  • Ignore case: true
  • Value: hello

Output: true


Example 4: Null case (ANSI mode on)

Argument values:

  • Expression: expression
  • Ignore case: false
  • Value: value
expressionvalueOutput
nullHellonull
hello worldnullnull
nullnullnull

Example 5: Null case (ANSI mode off)

Argument values:

  • Expression: expression
  • Ignore case: false
  • Value: value
expressionvalueOutput
nullHellofalse
hello worldnullfalse
nullnullfalse