Repository navigation
HashJoin probe: rows==1 fast path - #106008
Conversation
Two micro-optimizations to the probe-side row iteration: 1. `RowRefList::ForwardIterator::operator++` now issues `__builtin_prefetch(batch->next->next, 0, 0)` on each batch transition. With `Batch::MAX_SIZE == 7`, prefetching one batch ahead gives the line ~7 iterations of latency to land in L1 before we chase the `next` pointer ourselves. Locality 0 is used because the prefetched line is touched once and then evicted (streaming pattern, no temporal reuse). 2. `addFoundRowAll`'s non-lazy branch in `KnownRowsHolder.h` now short-circuits the `rows == 1` case, mirroring the existing lazy-path special case on lines above. The single inline `RowRef` inside `RowRefList` is fed to `appendFromBlock` directly, avoiding `ForwardIterator` construction and the `first` branch on the hot single-match path of `ALL` joins.
|
Workflow [PR], commit [daf35d2] Summary: ✅
AI ReviewSummaryThis PR adds a non-lazy Final VerdictStatus: ✅ Approve |
`Summary.to_markdown` builds the PR comment as
**Summary:** <symbol>
- <name>: <links_md>
...
|job_name|test_name|status|info|comment|
|:--|:--|:-:|:--|:--|
|[<job>](<url>)|...|
GitHub's markdown parser (and most CommonMark renderers) treats a `|...|`
line that comes directly after a `- ` list item as a continuation of the
list, so the failure table never builds — it just shows as a long string
of pipes inside the last bullet.
Insert an explicit blank line after the `extra_links` bullets so the
following section is parsed as its own block. Example PR
ClickHouse#106008 showed the broken
rendering — the `Performance Comparison: [Performance dashboard](...)`
bullet swallowed the entire `AST fuzzer` failure table.
Co-authored-by: Cursor <[email protected]>
alexey-milovidov
left a comment
There was a problem hiding this comment.
Looks good and reasonable, thank you!
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 6/6 (100.00%) | Lost baseline coverage: none · Uncovered code |
|
📊 Cloud Performance Report 🔴 AI verdict: This PR modifies the HashJoin row-collection path (addFoundRowAll), adding a single-row fast path. TPC-H Q4 leans heavily on that join path via its EXISTS semi-join, so the flagged +18.97% regression (3412ms vs 2868ms) is directly attributable to the change rather than noise. The delta is large and confirmed consistently by both tests, so it merits a look — verify the new single-row branch isn't adding overhead or mishandling the common multi-row case for this query. clickbench🟢 No significant changes tpch_adapted_1_official🔴 1 regressed Flagged queries (1 of 22)
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
|
The merge of `origin/master` auto-applied the single-row fast path of PR ClickHouse#106008 into `addFoundRowAll`, but that optimization is written against the pre-`BuildRef` `RowRefList` (it reads a `rows` field and casts the head node to `RowRef`), neither of which exists on this branch. It is also unnecessary here: a singleton lives inline in the cell word and the iterator decodes it without touching the arena node, which is exactly what the fast path was avoiding. Co-Authored-By: Claude Fable 5 <[email protected]>
The merge of `origin/master` auto-applied the single-row fast path of PR ClickHouse#106008 into `addFoundRowAll`, but that optimization is written against the pre-`BuildRef` `RowRefList` (it reads a `rows` field and casts the head node to `RowRef`), neither of which exists on this branch. It is also unnecessary here: a singleton lives inline in the cell word and the iterator decodes it without touching the arena node, which is exactly what the fast path was avoiding. Co-Authored-By: Claude Fable 5 <[email protected]>
Changelog category (leave one):
Version info
26.6.1.638