Menelais Karavelas created SPARK-36811:
------------------------------------------
Summary: Add bitwise functions for the BINARY data type
Key: SPARK-36811
URL: https://issues.apache.org/jira/browse/SPARK-36811
Project: Spark
Issue Type: New Feature
Components: SQL
Affects Versions: 3.3.0
Reporter: Menelais Karavelas
Fix For: 3.3.0
Add four new SQL functions operating on the `BINARY` data type for performing
bitwise operations: BITAND, BITOR, BITXOR, and BITNOT.
The BITAND, BITOR, and BITXOR functions take two byte strings as input and
return the bitwise AND, OR, or XOR of the two input byte strings. The byte size
of the result is the maximum of the byte sizes of the inputs, while the result
is computed by aligning the two strings with respect to their least significant
byte, and left-padding with zeros the shorter of the two inputs.
The BITNOT function is a unary function and returns the input byte string with
all the bits negated.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]