ClickHouse/tests/queries/0_stateless/02962_indexHint_rpn_construction.sql
2024-01-16 15:34:45 +00:00

21 lines
359 B
SQL

CREATE TABLE tab
(
`foo` Array(LowCardinality(String)),
INDEX idx foo TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree
PRIMARY KEY tuple();
INSERT INTO tab SELECT if(number % 2, ['value'], [])
FROM system.numbers
LIMIT 10000;
SELECT *
FROM tab
PREWHERE indexHint(indexHint(-1, 0.))
WHERE has(foo, 'b');
SELECT *
FROM tab
PREWHERE indexHint(0);