Repository navigation
Add test: PREWHERE producer of the query condition cache key untested for settings salt - #120128
clickgapai wants to merge 2 commits into
Conversation
Pre-PR validation: 6/6 ✅a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [9d285cf] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test for the Final Verdict✅ Approve. |
`count() FROM system.query_condition_cache` cannot tell a hit from a miss that rewrites the same key. Tag the cold/warm/flipped queries with `log_comment` and assert `QueryConditionCacheHits` and `SelectedMarks` < `SelectedMarksTotal`. Requested by @clickhouse-gh[bot] in ClickHouse#120128 (comment)
|
@clickgapai I'm closing this PR. Instead, wait till #120690 is merged. Then suggest a minimal and elegant extension of the test case. |
Test-only PR. Review: are the gaps real, is the test right.
Adds test coverage for 1 untested code path, found during automated review of PR #117803.
That PR: Folds a salt over ~90 settings that a function latches at build time (the
formatdatetime_*/parsedatetime_*family,locate,least/greatest, the conversion and JSON format settings, the parser limits,short_circuit_function_evaluation,session_timezone, ...) into every query …1. PREWHERE producer of the query condition cache key untested for settings salt
src/Storages/MergeTree/MergeTreeSelectProcessor.cpp:442,src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:1704Risk:
MergeTreeSelectProcessor.cpp:442is the onlyMergeTreekey producer none of the PR's tests reach: the PR's SQL test usesSELECT count()exclusively, which keeps aFilterStep(EXPLAIN: 1Filter ((line, 0Prewhere filter columnlines) so only the WHERE plan tag writes, and the PR's …Unique vs PR tests: The PR's
05099_*.sqlrunsSELECT count()only —EXPLAINshows aFilterstep and no PREWHERE, so it exercises the WHERE plan tag andFilterTransform; its05099_*_parquet.shexercisesFormatFilterInfoon theFileengine. This test is the only one that drives theMergeTreePREWHERE …Tags:
-- Tags: no-parallel—no-parallel: drops the instance-wide query condition cache and asserts its entry count, which a parallel sibling test would perturbcc @alexey-milovidov (author of #117803), @yariks5s (merged/approved #117803) — could you take a look, and add the
can be testedlabel if this looks good?Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Workflow [PR]
Sync PR [sync-upstream/pr/120128]