1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
# name: test/sql/function/numeric/test_bit_count.test
# description: BIT_COUNT test
# group: [numeric]
statement ok
CREATE TABLE bits(t tinyint, s smallint, i integer, b bigint, h hugeint)
statement ok
INSERT INTO bits VALUES (NULL, NULL, NULL, NULL, NULL), (31, 1023, 11834119, 50827156903621017, 3141592653589793238462643383279528841), (-59, -517, -575693, -9876543210, -148873535527910577765226390751398592512)
query IIIII
select bit_count(t), bit_count(s), bit_count(i), bit_count(b), bit_count(h) from bits
----
NULL NULL NULL NULL NULL
5 10 11 27 67
4 14 24 49 2
|