ClickHouse/tests/queries/0_stateless/02998_analyzer_prewhere_report.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
406 B
MySQL
Raw Normal View History

2024-02-21 17:31:55 +00:00
--https://github.com/ClickHouse/ClickHouse/issues/60232
CREATE TABLE hits
(
`date` Date,
`data` Array(UInt32)
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(date)
ORDER BY date;
INSERT INTO hits values('2024-01-01', [1, 2, 3]);
SELECT
hits.date,
arrayFilter(x -> (x IN (2, 3)), data) AS filtered
FROM hits
WHERE arrayExists(x -> (x IN (2, 3)), data)
SETTINGS allow_experimental_analyzer = 1;