Skip to content

Commit 583ac08

Browse files
Avogarclaude
andcommitted
Drop countmin statistic from 04812 so it runs in fast test
countmin statistics are not available in the fast-test build (hence the other countmin tests are tagged no-fasttest). The tautology test does not need it: tdigest on `cheap` drives the tautology detection, and `expensive = 'absent'` stays selective via the default equality selectivity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3344dbe commit 583ac08

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/queries/0_stateless/04812_prewhere_statistics_tautology_last.sql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ SET explain_query_plan_default = 'legacy';
1313

1414
DROP TABLE IF EXISTS t_prewhere_tautology;
1515

16-
-- Wide parts so per-column sizes feed into the cost score. `cheap` is a constant byte (tiny column),
17-
-- `expensive` holds large incompressible values (big column). `cheap < 255` matches all rows (a
18-
-- tautology), `expensive = 'absent'` matches none (highly selective) -- so without the sentinel the
19-
-- cheap tautology's finite score would place it before the expensive selective predicate.
16+
-- Wide parts so per-column sizes feed the cost score. tdigest on `cheap` lets the optimizer see
17+
-- `cheap < 255` as a tautology (matches all rows); `expensive = 'absent'` has no statistic, so its
18+
-- default equality selectivity makes it the selective but expensive (large incompressible values) predicate.
2019
CREATE TABLE t_prewhere_tautology (
2120
cheap UInt8 STATISTICS(tdigest),
22-
expensive String STATISTICS(countmin)
21+
expensive String
2322
) ENGINE = MergeTree ORDER BY tuple()
2423
SETTINGS min_bytes_for_wide_part = 0, auto_statistics_types = '';
2524

0 commit comments

Comments
 (0)