This topic describes how to use the BITNOT function to perform a bitwise NOT operation.

Limits

This function is supported only in Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 3.0.0 or later.

Syntax

INT BITNOT(INT number)     
Note The input and output parameters are both of the INT type.

Input parameters

Parameter Data type
number INT

Example

  • Test data
    a(INT)
    7
  • Test statement
    SELECT BITNOT(a) as var1
    FROM T1;             
  • Test result
    var1(INT)
    -8