Add test for old bug #7826

This commit is contained in:
Robert Schulze 2023-04-12 12:02:16 +00:00
parent 13c92ade68
commit cf05bf663c
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,12 @@
---
tab idx bloom_filter
---
Expression ((Projection + Before ORDER BY))
Filter (WHERE)
ReadFromMergeTree (default.tab)
Indexes:
Skip
Name: idx
Description: bloom_filter GRANULARITY 1
Parts: 1/1
Granules: 1/1

View File

@ -0,0 +1,23 @@
DROP TABLE IF EXISTS tab;
CREATE TABLE tab
(
foo Array(LowCardinality(String)),
INDEX idx foo TYPE bloom_filter
)
ENGINE = MergeTree
PRIMARY KEY tuple();
INSERT INTO tab VALUES (['a', 'b']);
SELECT '---';
SELECT table, name, type
FROM system.data_skipping_indices
WHERE table = 'tab';
SELECT '---';
EXPLAIN indexes = 1 SELECT * FROM tab WHERE has(foo, 'b');
DROP TABLE tab;