ClickHouse/tests/queries/0_stateless/02864_statistics_bug_69589.sql

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

14 lines
427 B
MySQL
Raw Normal View History

2024-09-23 19:44:45 +00:00
-- Tags: no-fasttest
-- no-fasttest: 'countmin' sketches need a 3rd party library
SET allow_experimental_statistics = 1;
SET allow_statistics_optimize = 1;
CREATE TABLE tab (c Nullable(Int)) ENGINE = MergeTree() ORDER BY tuple();
INSERT INTO tab (c) VALUES (1);
DELETE FROM tab WHERE TRUE;
INSERT INTO tab (c) VALUES (2);
ALTER TABLE tab ADD STATISTICS c TYPE countmin;
OPTIMIZE TABLE tab;
SELECT 1 FROM tab WHERE tab.c = 0;