Repository navigation
Devirtualize emission of non-joined rows in RIGHT and FULL joins - #105679
Conversation
|
Workflow [PR], commit [c32c878] Summary: ✅ AI ReviewSummaryThis PR refactors RIGHT/FULL Final VerdictStatus: ✅ Approve |
george-larionov
left a comment
There was a problem hiding this comment.
Nice optimization! LGTM.
| type->insertDefaultInto(*col); | ||
| continue; | ||
| } | ||
| } |
There was a problem hiding this comment.
consider adding
else
{
chassert(columns[j] != nullptr);
}
to guard against future bugs
LLVM Coverage Report
Changed lines: 93.33% (70/75) · Uncovered code |
b12263d
|
The perf tests introduced here are extremely noisy. Up to 100% noise in master (e.g. always say faster/slower when running with the same binary) (ref: #100759). Could you have a look please? |
This change de-virtualizes the emission of non-joined rows in RIGHT and FULL join following the same principle used in
AddedColumns.cppBenchmarking results from
right_full_hash_join.xml:Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
De-virtualize the emission of non-joined rows in RIGHT and FULL join by batching them.
Note
Medium Risk
Touches RIGHT/FULL join non-joined row emission paths and adds a new
IColumnoverload that changes how defaults/null entries are handled; mistakes could lead to incorrect join output rows or crashes in edge cases (replicated columns, nullmaps, parallel buckets).Overview
Improves RIGHT/FULL hash join non-joined row emission by collecting
(ColumnsInfo*, row_num)pairs and then batch-filling output columns viafillFromBlocksAndRowNumbers, replacing per-row/per-columninsertFromloops.Extends
IColumn/IColumnHelperwith a secondfillFromBlocksAndRowNumbersoverload optimized for the non-null case, while keeping the existing API that interpretsnullptrentries as defaults; adds a performance test (right_full_hash_join.xml) covering wide/narrow/nullable build tables and varying unmatched rates.Reviewed by Cursor Bugbot for commit 50e1346. Bugbot is set up for automated code reviews on this repo. Configure here.
Version info
26.6.1.150