Skip to content

Derive deterministic conditions from conditions involving the current time for the query condition cache - #115522

Merged
alexey-milovidov merged 36 commits into
masterfrom
qcc-time-conditions
Oct 13, 2026
Merged

alexey-milovidov merged 36 commits into
masterfrom
qcc-time-conditions

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Performance Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

The query condition cache now serves conditions that involve the current time, e.g. WHERE time >= now() - INTERVAL 10 DAY, when reading from MergeTree tables, by deriving a deterministic condition from them with the current-time constant rounded onto a time grid. Closes #115504.

Documentation entry for user-facing changes

Documented in docs/concepts/features/performance/caches/query-condition-cache.mdx and in the new settings' descriptions.


A condition like time >= now() - INTERVAL 10 DAY reaches the storage layer with the current-time expression folded into a non-deterministic constant. It could never benefit from the query condition cache: the constant (and hence the condition hash) changes with every query, and the cache refuses non-deterministic conditions anyway (#81506, #84508).

This PR derives a deterministic condition from such conditions by rounding the folded time constants onto a time grid:

time >= '2026-08-09 12:34:56'  ~~~>  time >= '2026-08-09 00:00:00'  (rounded down)
                                     time >= '2026-08-10 00:00:00'  (rounded up)

The grid step is proportional to the distance between the constant and the current time — one day for a condition looking back ten days, one hour for a condition looking back ninety minutes — multiplied by a configurable factor (query_condition_cache_time_condition_grid_factor, default 1.0) and capped at one day. This bounds the boundary error relative to the window the query looks at, and makes the cache key rotate roughly once per the same fraction of the window, balancing cache usefulness against staleness of the boundary.

Soundness. The two sides of the cache round in opposite directions, so each cache entry stays a true statement regardless of clocks, concurrency, shards or replicas:

  • Writes (an observed "no rows of this granule match the filter") are stored under a strengthened condition — the derived condition implies the evaluated one, so "no rows match the evaluated condition" implies "no rows match the derived condition". This covers all three write sites: the WHERE filter (updateQueryConditionCache/FilterTransform), the PREWHERE filter (MergeTreeSelectProcessor), and the index-analysis granule exclusions (ReadFromMergeTree, under the skip-index-profiled key as before).
  • Reads (filterPartsByQueryConditionCache) probe a weakened condition — the actual filter implies the derived one, so "no rows match the derived condition" makes skipping the granule sound.

Each side only needs its own implication, verified locally against its own condition; a hit is possible only when the two derived conditions are structurally identical (same rounded constant), so entries can never be misapplied.

Behavior. When the folded constant is already aligned to the grid — today() - 10, toStartOfDay(now()), toStartOfHour(now()) (rounding is DST-aware, in the timezone of the constant's type) — rounding up and down coincide, so the very next query already reuses the cache, and the key stays stable until the constant changes (e.g. until the end of the day). This exactly matches the issue's example: the derived condition "can be used until the end of day". For an unaligned constant like raw now() - INTERVAL 10 DAY, writes go to the grid point above the constant and reads probe the grid point below, so entries written during one grid cell serve the queries of the next one: yesterday's queries prime the cache for today's dashboards.

The derivation understands monotone condition shapes: AND/OR chains, NOT (which flips the rounding direction), and comparisons of a deterministic expression with a non-deterministic constant of type Date/Date32/DateTime/DateTime64. Anything else non-deterministic (e.g. rand(), __topKFilter mixes, equality with a time constant, non-temporal folded constants such as shardNum() arithmetic) keeps the previous behavior: not cached. Deterministic conditions are entirely unaffected — they keep their existing hashes.

Verified locally (single part of 2M rows, half of them older than the condition boundary): the second run of SELECT sum(x) FROM tab WHERE time >= today() - 100 drops 122/245 granules through the PREWHERE consult path and 117/245 through the WHERE path.

New settings:

  • use_query_condition_cache_for_time_conditions (default: true)
  • query_condition_cache_time_condition_grid_factor (default: 1.0; values <= 0 disable the derivation)

Possible follow-ups (out of scope here): same-cell reuse for unaligned constants by additionally evaluating the weakened condition at the write sites; applying the derivation to the object-storage read paths and to the TopK predicate-only reuse hash.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/115522]

Version info

  • Merged into: 26.10.1.2322-master (included in 26.10 and later)

… time for the query condition cache

A condition like `time >= now() - INTERVAL 10 DAY` reaches the storage
layer with the current-time expression folded into a non-deterministic
constant, so it could never be served by the query condition cache: its
hash changes with every query, and the cache refuses non-deterministic
conditions anyway.

Derive a deterministic condition from such conditions by rounding the
folded time constants onto a time grid whose step is proportional to
the distance between the constant and the current time (capped at one
day). Cache writes round toward the condition (the derived condition
implies the observed one), cache reads round away from it (the actual
condition implies the derived one), so every cache entry remains a true
statement and reads can only skip granules soundly.

When the constant is already grid-aligned (`today() - 10`,
`toStartOfDay(now())`), both directions agree and the cache is
effective for the whole grid cell, e.g. until the end of the day.
Otherwise entries written during one grid cell serve the queries of the
next one: yesterday's queries prime the cache for today's dashboards.

Closes #115504

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2ab128f]

Summary: ✅


AI Review

Summary

This PR extends the MergeTree query condition cache so filters with folded current-time constants can be rewritten onto a deterministic time grid, and it threads that through the WHERE, PREWHERE, skip-index, TopK, settings, docs, and test coverage. The implication-based rounding itself looks sound, but one realistic TopK surface is still left behind: sampled TopK reads do not reuse plain WHERE entries even though the code comments say they should.

Findings
  • ⚠️ Majors
    • [src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:1852] The predicate-only reuse probe is still gated by apply_top_k_salt, so a sampled TopK read never builds topk_reuse_predicate_only_hash. In the WHERE path that leaves drop_mark_ranges probing the raw hash that still contains __topKFilter, but sampled TopK writes are disabled and plain reads only ever write the stripped predicate key. A query like SELECT ... SAMPLE 0.1 WHERE time >= now() - INTERVAL 10 DAY ORDER BY ... LIMIT 10 therefore always misses the query condition cache on the WHERE side, despite the nearby comment saying sampled reads should consult plain entries only.
    • Suggested fix: keep the stripped-predicate/plain-key probe for top_k_filter_info->where_clause even when SAMPLE disables the salted probe, and gate only the salted condition_hash lookup on apply_top_k_salt.
Final Verdict
  • ⚠️ One major feature gap remains: sampled TopK reads should still probe the plain predicate key on the WHERE side before this is ready.

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Aug 19, 2026
Comment thread src/Core/Settings.cpp Resolved
@rschu1ze

Copy link
Copy Markdown
Member

@shankar-iyer Do you like to review this PR?

Initialize `rounded_seconds` and `rounded_ticks` (`cppcoreguidelines-init-variables`),
drop the link to the not-yet-generated settings page for
`query_condition_cache_time_condition_grid_factor`, and scope the new setting
descriptions and documentation to `MergeTree`, since the file and object storage
read paths still use the query condition cache only for deterministic conditions.
@shankar-iyer shankar-iyer self-assigned this Aug 21, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 2ab128fc0 with master 9e058f845 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

110 object files changed (+188.66 KiB total), 1 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp.o 1011.98 KiB 1.09 MiB +99.71 KiB (+9.85%)
src/CMakeFiles/dbms.dir/Interpreters/Cache/QueryConditionCacheTimeConditions.cpp.o new 68.48 KiB +68.48 KiB

719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

357 translation units recompiled, 3349 s compile time in total, 356 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×0.91 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost -309.6 s (-8%) in total before that adjustment.

Job report

@clickhouse-gh

clickhouse-gh Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 31 queries analysed

This PR lets the query condition cache handle filters that depend on the current time, such as WHERE time >= now() - INTERVAL 10 DAY. Filters that are already fixed values skip the new code entirely. None of the flagged queries can reach that path: ClickBench Q33 and Q34 have no WHERE clause, and TPC-H Q1 and Q7 filter only on fixed date literals. The four improvements (-12.0%, -13.7%, -20.0%, -24.7%) all show up together with lower CPU time, on both benchmarks, which both ran on the same machine for this PR. That fits a faster host, so all four are downgraded to not_sure, and the PR shows no performance change on these benchmarks.

clickbench

⚠️ 2 inconclusive

Flagged queries (2 of 43)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 33 not_sure 1134 998 -12.0% <0.0001 Q33 is a GROUP BY over the whole table with no WHERE clause, so the query condition cache change never applies. The -12.0% is more likely a faster or quieter host.
⚠️ 34 not_sure 1140 984 -13.7% <0.0001 Q34 groups by URL with no filter, so the new time-condition caching logic is never reached. The -13.7% change comes with a matching CPU drop, which points to the host rather than the code.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

tpch_adapted_1_official

⚠️ 2 inconclusive

Flagged queries (2 of 22)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 1 not_sure 65 52 -20.0% <0.0001 Q1 filters on a fixed date literal, which is already deterministic, so the new derivation returns early and changes nothing. With noisy measurements and a 13 ms shift, -20.0% is not attributable to this PR.
⚠️ 7 not_sure 81 61 -24.7% <0.0001 Q7 filters on a fixed date range and joins tables, with nothing that depends on the current time. The -24.7% change (20 ms) does not follow from this diff.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

Debug info
  • StressHouse run: 9a488933-60e1-4ed9-be38-f59e4eb90b25
  • MIRAI run: 7e6ca150-2cad-4430-b1b5-139ee903fbcc
  • PR check IDs:
    • clickbench_1086660_1791824499
    • clickbench_1086666_1791824499
    • clickbench_1086672_1791824499
    • tpch_adapted_1_official_1086683_1791824499
    • tpch_adapted_1_official_1086694_1791824499
    • tpch_adapted_1_official_1086731_1791824499

@mintlify

mintlify Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Oct 13, 2026, 1:35 PM

alexey-milovidov and others added 2 commits August 24, 2026 10:38
…ry condition cache tests

The test failed in the "old analyzer" CI configuration: the query condition cache only works
with the analyzer (`query_info` has no filter DAG without it), so no entries were cached and no
hits happened. All other `query_condition_cache` tests already force the analyzer for the same
reason (`SET allow_experimental_analyzer = 1`).

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115522&sha=af8112e0405b98a3ea1e1cb0b14c4ef360ba699c&name_0=PR&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20old%20analyzer%2C%20s3%20storage%2C%20DBReplicated%2C%20WasmEdge%2C%20sequential%2C%202%2F2%29
PR: #115522

Co-Authored-By: Claude Fable 5 <[email protected]>
With `time` in the primary key, the granules holding only old rows are excluded by index
analysis, so the cache entries for them can only have been written by `ReadFromMergeTree`
under the skip-index-profiled hash of the derived condition (the filter transforms never read
those granules). The second query probes the cache before index analysis runs and proves the
reuse via `QueryConditionCacheHits`.

Co-Authored-By: Claude Fable 5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The BuzzHouse (amd_tsan) failure ("Logical error: Not-ready Set is passed as the second argument for function ...") is unrelated to this PR: it matches the long-standing open issue #107619 (tracked since well before this PR), with fixes already in progress, e.g. #115083 and #102192.

The 04931_query_condition_cache_time_conditions failure in the old-analyzer configuration is fixed by forcing enable_analyzer = 1 in the test (the query condition cache only works with the analyzer, like all other query_condition_cache tests), and the review request for coverage of the indexed ReadFromMergeTree write path is addressed by the new test 05025_query_condition_cache_time_conditions_indexed.sh.

…y.cpp`

Master moved the current version block to `26.9`, so
`use_query_condition_cache_for_time_conditions` and
`query_condition_cache_time_condition_grid_factor` have to be recorded there
instead of `26.8`.
Address review: TopK dynamic filtering folds the internal `__topKFilter`
function into the storage filter as `and(__topKFilter(...), time >= ...)`,
and `deriveDeterministicTimeCondition` rejected any non-deterministic
function outside its `and` / `or` / `not` / comparison spine. A query like
`SELECT ... WHERE time >= now() - INTERVAL 10 DAY ORDER BY ... LIMIT n`
therefore derived nothing and bypassed the query condition cache entirely,
even though the plain `WHERE`, `PREWHERE` and index-analysis paths support it.

`deriveDeterministicTimeCondition` now takes `allow_top_k_filter`, which
treats `__topKFilter` as an opaque deterministic leaf, mirroring
`isDeterministicAllowingTopKFilter` in `updateQueryConditionCache` and
`ReadFromMergeTree`. It is passed only where the cache key is additionally
partitioned by the TopK plan parameters (the `WHERE` write paths and the
`WHERE` consult), because granule exclusions produced under a running
`__topKFilter` threshold may only be reused under the same TopK plan. The
`PREWHERE` write and consult paths do not apply that salt, so they keep
rejecting `__topKFilter`.

The predicate-only reuse hash - which lets a TopK read consume entries
primed by a plain `SELECT ... WHERE` - is now derived the same way, so a
current-time predicate reuses those entries too;
`getTopKReusePredicateOnlyConditionHash` became
`getTopKReusePredicateOnlyNode` and the caller turns the node into a key.

Adds `05054_query_condition_cache_time_conditions_top_k`, covering the TopK
write/read round trip, the reuse of plain `WHERE` entries by a TopK read, and
the setting being off.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115522&sha=47c15d694d6ac9b740df5b5fb52113d377ae81ba&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.

The Upgrade check (amd_release) failure is Error message in clickhouse-server.log, and the message is unrelated to this pull request (it does not touch mutations):

<Error> MutatePlainMergeTreeTask: Code: 16. DB::Exception: Unexpected const virtual column: _table: While executing MergeTreeSequentialSource. (NO_SUCH_COLUMN_IN_TABLE)

This is the known open issue #102331 (MutationsInterpreter::Source::read passes _table to createReadFromPartStep), which has no fix on master yet.

@groeneai

groeneai commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

The fix is already merged: #117218 (mine, merged 2026-09-02T14:31:57Z as 84ac4b28254a). It adds one fixed-string allowlist entry for this message to the upgrade check's log scan in tests/docker_scripts/upgrade_runner.sh.

What that run hit:

  • Upgrade check (amd_release) on 47c15d69 failed 1 of 12 rows, and the only failing row is the log scan. All 100 lines the report records from upgrade_error_messages.txt are this one message, in the three shapes a single retry emits (MutatePlainMergeTreeTask, MutatePlainMergeTreeTask::executeStep, MergeTreeBackgroundExecutor). Passing that file through the merged entry leaves 0 lines.
  • The mutation comes from 04510_mutation_query_plan_only_virtual_columns, where ALTER TABLE t_mut_local DELETE WHERE _table != '' is asserted to fail (-- { serverError UNFINISHED }). The upgrade check clones the previous release's test suite, and --upgrade-check implies --fake-drop (tests/clickhouse-test:7230), so the table and its unfinished mutation survive the restart and the upgraded server retries them into clickhouse-server.upgrade.log.
  • Onset matches: that test is on 26.8 and on no older release branch, and v26.8.1.2041-lts was published 2026-08-30T13:47:42Z. The first occurrence of this row anywhere is 2026-08-30 22:48:05, this check passed on this PR on 2026-08-27 when the previous release was still 26.7.5, and it has hit 49 distinct trees since.

Nothing to do on your side: the job checks out the PR merged into master (CHECKOUT_REF is empty unless DISABLE_CI_MERGE_COMMIT=1), so the next run takes the entry from master.

What #117218 does not do: #102331 stays open. The entry suppresses the message in that one log scan, on the grounds that only a mutation command naming _table reaches the throw, since a query read fills it from the storage id. It is not an engine fix, and 04510 pins the current behaviour, so fixing #102331 means updating that assertion too.

@clickhouse-gh clickhouse-gh Bot added the comp-filesystem-cache Filesystem cache for remote/object storage, page cache, and read caching infrastructure. label Sep 4, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The only red check on f1cbf2e was Build (arm_tidy, 2/4): gtest_throttler_constraint.cpp used an undeclared FifoQueue. That file is not touched by this PR, and master has already fixed it (be9cfb1 "Fix tidy build"). Pushed 089cf72, which merges master cleanly. The PR's changed translation units build locally.

…the start of an hour

The recent rows were inserted in the hour before `now()`. When the test ran
right after the start of an hour (or a day), `time >= toStartOfHour(now())`
(or `time >= today()`) matched no row of the part at all, so the automatic
`minmax` statistics on `time` pruned the whole part before reading. Nothing was
read, so nothing was recorded in the query condition cache, and all three
retries reported `0 0`.

Insert the recent rows in the hour after `now()`, so they always match these
conditions.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=115522&sha=089cf7272fd81a92a3ef12944d2aede5b000e24d&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20flaky%20check%29
#115522

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The only red check on 089cf72 was Stateless tests (amd_tsan, flaky check): 05153_query_condition_cache_time_conditions_fine_grid reported hour-aligned, small factor: 0 0. The run started at 18:59:58 and probed at 19:00:03. The recent rows had been inserted in the hour before now(), so time >= toStartOfHour(now()) matched no row of the part. The automatic minmax statistics on time then pruned the whole part, so nothing was read and nothing was cached. I confirmed this locally: a deterministic condition that matches nothing also leaves the query condition cache empty, so this is not caused by the time-condition derivation. Pushed 8325a4e, which inserts the recent rows in the hour after now(), so they always match toStartOfHour(now()) and today(). The test passes 5/5 locally, with and without randomized settings.

Comment thread src/Core/Settings.cpp Resolved
… lower bounds

The description of `use_query_condition_cache_for_time_conditions` said that entries
written during one grid cell are used during the next one for every unaligned
constant. That only holds for lower bounds like `time >= now() - INTERVAL 10 DAY`:
an unaligned upper bound like `time < now()` (alone or in a sliding window) is never
contained in the condition of an earlier query, so it is not reused. Say so in the
setting description and in the query condition cache documentation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The only CI failure, 05316_top_k_primary_key_skip_query_condition_cache in "Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted)" (https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=115522&sha=8325a4eecf0160cd21bd70e8d5d4b282dfbe6acf&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20distributed%20plan%2C%20targeted%29), is a flaky test that is not related to this PR. It failed the same way (read_rows of the second query is not smaller than the first) in #101022, #124676 and #94017 during 2026-10-10 and 2026-10-11. A fix is in progress in #125152.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Pushed 21d12f9, which merges master cleanly (no conflicts; clickhouse builds locally). The two red checks on 8428669 are not caused by this PR:

  • AST fuzzer (arm_asan_ubsan): Cannot call function and because is has 3 arguments but 2 columns were captured on a clusterAllReplicas(...) query filtering by _table. It hits master and a dozen other PRs in the last two days. The fix is open in Rebuild a reduced and when pruning parts and files by virtual columns #125126 (it rebuilds copied and/indexHint nodes when pruning by virtual columns).
  • Performance Comparison (amd_release, master_head, 3/6): uuid_ip_comparison BaseDaemon: terminate on double SIGINT #3 +17%. That test reads from a Memory table with max_threads = 1. This PR only changes MergeTree reading and the query condition cache, so it cannot reach that query.

Conflict in `MergeTreeSelectProcessor::read`: master added a second write
of the static PREWHERE conditions (`query_condition_cache_attribution`)
next to the main PREWHERE write, which this PR had moved to a precomputed
`prewhere_condition_for_query_condition_cache`. Keep both: the main write
uses the precomputed condition when present, and the attribution write is
done independently of it (so the outer guard no longer requires the
precomputed condition).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Pushed 2ab128f, which merges master and resolves the conflict in MergeTreeSelectProcessor::read. master added a second PREWHERE write for the static conditions shared with a join runtime filter (query_condition_cache_attribution, ad32f3c0e06). This PR moved the main PREWHERE write to the precomputed prewhere_condition_for_query_condition_cache. The resolution keeps both writes, and the attribution write no longer depends on the precomputed condition. That matters because a PREWHERE with a runtime filter is non-deterministic, so the precomputed condition is empty for it. clickhouse and unit_tests_dbms build locally. These tests pass on the merged build: the PR's 6 time-condition stateless tests, 05258_query_condition_cache_prewhere_attribution, the 03229/04303/05045 runtime-filter query condition cache tests, and the related gtests.

The red checks on 21d12f9 are not caused by this PR:

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 13, 2026
Merged via the queue into master with commit ce8b083 Oct 13, 2026
176 checks passed
@alexey-milovidov
alexey-milovidov deleted the qcc-time-conditions branch October 13, 2026 20:43
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 13, 2026
thevar1able pushed a commit to actueleai/ClickHouse that referenced this pull request Nov 24, 2026
… runtime filter in the query condition cache"

This reverts commit 64da8a0, reversing
changes made to be89302.

Conflicts resolved by keeping the later changes in the same lines:
`is_query_prewhere` (ClickHouse#130645), the `last_reader_evaluating_defaults`
argument (ClickHouse#128452), `readsSameColumns` (ClickHouse#124880), `follows_top_k_filter`
(ClickHouse#129882), and the PREWHERE query condition cache write of ClickHouse#115522 in
its own form before it merged ClickHouse#122380.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

1 active deployment
staging - docs — 2ab128fc Deployed Oct 13, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-mergetree MergeTree* family: parts, merges, primary index, column statistics, background data transformation. pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deriving deterministic conditions from conditions involving the current time for the query condition cache

5 participants