diff --git a/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.reference b/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.reference @@ -0,0 +1 @@ +1 diff --git a/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.sql b/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.sql new file mode 100644 index 00000000000..81dd7cab9f4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00974_bitmapContains_with_primary_key.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS test; +CREATE TABLE test (num UInt64, str String) ENGINE = MergeTree ORDER BY num; +INSERT INTO test (num) VALUES (1), (2), (10), (15), (23); +SELECT count(*) FROM test WHERE bitmapContains(bitmapBuild([1, 5, 7, 9]), toUInt32(num)); +DROP TABLE test;