Data connectivity & integrationPipeline Builder ExpressionsBitwise and

Bitwise and

Supported in: Batch, Faster

Returns the bits set in both of two integral values. If either value is null, returns null.

Expression categories: Binary

Declared arguments

  • Left: The first integral value.
    Expression<T1>
  • Right: The second integral value.
    Expression<T2>

Type variable bounds: T1 accepts Byte | Integer | Long | Short, T2 accepts Byte | Integer | Long | Short

Output type: Byte | Integer | Long | Short

Examples

Example 1: Base case

Argument values:

  • Left: 12
  • Right: 10

Output: 8


Example 2: Base case

Argument values:

  • Left: -1
  • Right: 255

Output: 255


Example 3: Null case

Argument values:

  • Left: null
  • Right: 10

Output: null


Example 4: Null case

Argument values:

  • Left: 12
  • Right: null

Output: null


Example 5: Edge case

Description: The narrower value is widened to the type of the wider one.

Argument values:

  • Left: 12
  • Right: 10

Output: 8