Bitwise Functions

bitwise_and(x, y) [same as input]

Returns the bitwise AND of x and y in 2’s complement representation. Corresponds to Spark’s operator &.

bitwise_or(x, y) [same as input]

Returns the bitwise OR of x and y in 2’s complement representation. Corresponds to Spark’s operator ^.

shiftleft(x, n) [same as x]

Returns x bitwise left shifted by n bits. Supported types for ‘x’ are INTEGER and BIGINT.

shiftright(x, n) [same as x]

Returns x bitwise right shifted by n bits. Supported types for ‘x’ are INTEGER and BIGINT.