From e6c85df04b717bac9528f61a338a6aea1479165d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 22 Mar 2021 23:50:04 +0300 Subject: [PATCH] Add a test for #7963 --- .../0_stateless/01771_bloom_filter_not_has.reference | 3 +++ tests/queries/0_stateless/01771_bloom_filter_not_has.sql | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/queries/0_stateless/01771_bloom_filter_not_has.reference create mode 100644 tests/queries/0_stateless/01771_bloom_filter_not_has.sql diff --git a/tests/queries/0_stateless/01771_bloom_filter_not_has.reference b/tests/queries/0_stateless/01771_bloom_filter_not_has.reference new file mode 100644 index 00000000000..fc08c4c0d15 --- /dev/null +++ b/tests/queries/0_stateless/01771_bloom_filter_not_has.reference @@ -0,0 +1,3 @@ +10000000 +1 +9999999 diff --git a/tests/queries/0_stateless/01771_bloom_filter_not_has.sql b/tests/queries/0_stateless/01771_bloom_filter_not_has.sql new file mode 100644 index 00000000000..ab0e3d308f9 --- /dev/null +++ b/tests/queries/0_stateless/01771_bloom_filter_not_has.sql @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS bloom_filter_null_array; +CREATE TABLE bloom_filter_null_array (v Array(Int32), INDEX idx v TYPE bloom_filter GRANULARITY 3) ENGINE = MergeTree() ORDER BY v; +INSERT INTO bloom_filter_null_array SELECT [number] FROM numbers(10000000); +SELECT COUNT() FROM bloom_filter_null_array; +SELECT COUNT() FROM bloom_filter_null_array WHERE has(v, 0); +SELECT COUNT() FROM bloom_filter_null_array WHERE not has(v, 0); +DROP TABLE bloom_filter_null_array;