Shaobo Guan created SPARK-55559:
-----------------------------------
Summary: BIT_COUNT returns wrong result
Key: SPARK-55559
URL: https://issues.apache.org/jira/browse/SPARK-55559
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.5.6
Reporter: Shaobo Guan
BITCOUNT evaluated with tinyint/smallint/int are all treated input as 64 bit
and the output is incorrect.
With int column:
Row 1 (a=-2147483648):
Column 'out': actual=33
Row 2 (a=-65536):
Column 'out': actual=48
Row 3 (a=-256):
Column 'out': actual=56
Row 4 (a=-1):
Column 'out': actual=64
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]