File: test_bit_count.test

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (17 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (3)
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