Repository navigation
Conversation
Follow-up to ClickHouse#111059 requested by nihalzp: the reverse-key primary-key index-analysis fix is backported to versions without the JOIN runtime-filter read-time pruning path (MergeTreeIndexReadResultPool), so that path is not covered by the backportable test 04612_reverse_key_index_analysis. This adds the missing coverage on master only. The enable_join_runtime_filters_index_analysis path builds a read-time KeyCondition from a join's collected probe keys and prunes the probe-side primary key. It must honor the key sort directions: before ClickHouse#111059 a DESC primary-key column was analyzed as ascending, which inverts the value interval and drops granules holding matching rows (on a set-index probe it aborts with Invalid binary search result in MergeTreeSetIndex). The test joins on reverse-sorted primary keys (DESC second, DESC leading, and a single DESC column) and checks that the result with the feature on equals the result with it off, and that pruning actually engaged (RuntimeFilterGranules Considered and Dropped both greater than zero) so the equality is not vacuous.
Internal second-model review — adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 2 findings across 1 full pass + 1 fix round + 1 delta recheck; final content recheck: 0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-author-slot-3:20260724-094900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-author-slot-3:20260724-094900 |
|
cc @KochetovNicolai could you review this? It is a test-only follow-up to #111059, adding the missing coverage for the JOIN runtime-filter index-analysis path ( |
|
Workflow [PR], commit [17358ee] Summary: ✅ AI ReviewSummaryThis PR adds a master-only stateless regression test for reverse-key JOIN runtime-filter primary-key pruning, covering both the exact-set path and the overflow-to-range path. The current head closes the earlier coverage gap by forcing range mode and proving that it prunes differently from the exact-set branch, so I did not find a remaining correctness issue in the test itself. PR Metadata
Final Verdict
|
The reverse-key JOIN runtime-filter test only exercised the exact IN-set
(MergeTreeSetIndex) path: each build side has fewer distinct keys than
join_runtime_filter_exact_values_limit, so buildRuntimeRangePredicate never
took its [min, max] range branch.
Make the hot subset two non-adjacent r values (10 and 90) and add, per
reverse-key shape, a range-branch workload that lowers
join_runtime_filter_exact_values_limit below the distinct-key count so the
exact-values set overflows and is released and the read-time KeyCondition is
built from the recorded range envelope. With the hot values far apart the two
predicate shapes prune differently: the exact IN-set {10, 90} drops every
granule outside those values while the [10, 90] range keeps the whole span.
The assertion checks each shape drops on both paths and that the range path
drops strictly fewer granules than the IN-set path, so it fails if pruning
silently stays on the IN-set path (equal counts) or a wrongly-inverted
reverse-key range drops nothing. Results must equal the feature-off result on
both paths.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Internal second-model review - adjudication log (click to expand)Pre-push review by an independent model (engine: codex; 2 findings across 1 full pass + 1 delta re-review).
|
CI finish ledger — 17358eeEvery failure has an owner: a fixing PR, or a full-effort fix task. Only
Not PR-caused: this is a test-only PR (adds Session id: cron:our-pr-ci-monitor:20260724-193000 |
CI finish ledger — 17358eeThis is a test-only PR (adds stateless test
Session id: cron:our-pr-ci-monitor:20260724-200000 |
|
Fixing PR for the A correction to that row's reason, since the investigation contradicted it: the failure is not a
That second half is what #112112 fixes, and it is why the same trigger produced opposite |
84e3e36
…adline The guard added in the previous commit fires on a disjunction: a non-zero `curl` exit, OR a response with no `X-ClickHouse-Timezone` header. Its message and the comment above the helper described only the second condition, so the first one printed a false statement. Measured against a listener that emits complete, correct `200` headers including a real `X-ClickHouse-Timezone`, then a `Content-Length` larger than the body it actually sends, then a reset: `curl` exits 56 with the header present, so only the exit-status condition fires, and the report claimed the request never reached query execution when it demonstrably had. That shape is caught either way; only the wording was wrong. Reword the single unconditional `echo` to cover both conditions and keep `(curl exit $rc)`, which is what discriminates a header-missing response from a transport failure. Update the comment block to state both conditions. No logic change: the guard, the truncation, the body file, the anchored match and all 13 call sites are untouched, and the test's stdout stays byte-identical to `origin/master`'s (sha256 7611820edd3674d2..., which is also the `.reference` hash). The new headline was checked against `MESSAGES_TO_RETRY` in `tests/clickhouse-test`: it matches none of the 11 entries, so it cannot itself make a run retryable. Related: ClickHouse#111777 Co-Authored-By: Claude Opus 5 <[email protected]>
Related: #111059
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not for changelog.
Description
Follow-up requested by @ nihalzp on #111059 (inline review on
MergeTreeIndexReadResultPool.cpp): the reverse-key primary-key index-analysis fix is backported to versions without the JOIN runtime-filter read-time pruning path, so that path was left out of the backportable test04612_reverse_key_index_analysis. This adds the missing coverage on master only.The
enable_join_runtime_filters_index_analysispath builds a read-timeKeyConditionfrom a join's collected probe keys inMergeTreeIndexReadResultPooland prunes the probe-side primary key. It must honor the key's sort directions: before #111059 aDESCprimary-key column was analyzed as ascending, which inverts the value interval and drops granules that hold matching rows (on a set-index probe it aborts withInvalid binary search result in MergeTreeSetIndex).The new stateless test
04628_join_runtime_filter_reverse_keyjoins on reverse-sorted primary keys (DESC as the second column, DESC as the leading column, and a single DESC column) and checks that:enable_join_runtime_filters_index_analysis = 1equals the result with it off (pruning must not change results), andRuntimeFilterGranulesConsidered > 0andRuntimeFilterGranulesDropped > 0), so the equality check is not vacuous.On pre-#111059 code the test fails (wrong result / abort in the pruning path); after the fix it passes.