feat(clickhouse): add StatisticsPartPruning oracle; re-enable RowPolicy oracle - #15
Merged
Merged
Conversation
…cy oracle New ClickHouseStatisticsPartPruningOracle covers ClickHouse#94140's use_statistics_for_part_pruning (26.4 default-on), which was previously only exercised incidentally via the generic settings randomizer. Two arms, both differential ON/OFF over toString(v) row multisets: a fresh-fixture arm with a minmax-statistics-decorated column populated across disjoint-range parts, and a backfill arm that ADD STATISTICS on an already-populated table before and after MATERIALIZE STATISTICS to check the staleness boundary. Validated 0-FP on dev-vm head 26.9.1.268 (multiple isolated + full-fleet runs, 300k+ queries combined). Also re-enable the RowPolicy oracle: its Code-49 noise source (#106099) is fixed upstream, and the oracle now tolerates the Code 162/306 depth-error families locally and checks the CREATE POLICY return value before proceeding. Prune the now-closed #106099 entry from CLAUDE.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ClickHouseStatisticsPartPruningOraclecovers ClickHouse/ClickHouse#94140 ("Add statistics-based part pruning"), i.e. theuse_statistics_for_part_pruningsetting (default-on since 26.4). Before this, the setting was only exercised incidentally via the generic session-settings randomizer, with no dedicated correctness check.use_statistics_for_part_pruning=1vs=0overtoString(v)row multisets:Int64/Float64/Decimal(18,4)column (optionallyNullable, with NaN/Inf edge rows for floats) declaredSTATISTICS(minmax), populated across disjoint-range parts, probed with range/boundary/NULL predicates.ALTER TABLE ... ADD STATISTICSon an already-populated table before and afterMATERIALIZE STATISTICS, checking that stale/un-backfilled parts aren't wrongly pruned.StatisticsPartPruningand appended toALL_ORACLESin.claude/run-sqlancer.sh.RowPolicyoracle (its Code-49 noise source, ClickHouse#106099, is fixed upstream; the oracle now tolerates the Code 162/306 depth-error families locally and checks theCREATE POLICYreturn value before proceeding) and prunes the now-closed #106099 entry from.claude/CLAUDE.md.Test plan
mvn -B package -DskipTests=true -Djacoco.skip=truebuilds clean.--oracles StatisticsPartPruning, 8 min / 26.7k queries: 0 thread deaths, 0 reproducers.--oracles StatisticsPartPruning, 15 min / 64k queries, 6 threads: 0 thread deaths, 0 reproducers.--oracles all, 10 min / 47k queries: 67 reproducers, all attributable to the pre-existing, by-designTextIndexDirectRead#107186 family (none from the new oracle).--oracles StatisticsPartPruning,RowPolicy, 10 min / 115k queries, head 26.9.1.268: 0 thread deaths, 0 reproducers.