perf: specialize single-column hash-join key equality check - #24067
perf: specialize single-column hash-join key equality check#24067shehab-ali wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24067 +/- ##
==========================================
+ Coverage 80.75% 80.90% +0.14%
==========================================
Files 1096 1102 +6
Lines 373582 376357 +2775
Branches 373582 376357 +2775
==========================================
+ Hits 301686 304482 +2796
+ Misses 53893 53769 -124
- Partials 18003 18106 +103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @shehab-ali, thanks for the request (#24067 (comment)). Only whitelisted users can trigger benchmarks. Allowed users: 2010YOUY01, Dandandan, Fokko, Jefffrey, Omega359, Rachelint, adriangb, alamb, asubiotto, brunal, buraksenn, cetra3, codephage2020, coderfender, comphead, erenavsarogullari, etseidl, friendlymatthew, gabotechs, geoffreyclaude, grtlr, haohuaijin, jonathanc-n, kevinjqliu, klion26, kosiew, kumarUjjawal, kunalsinghdadhwal, liamzwbao, mbutrovich, mkleen, mzabaluev, neilconway, rluvaton, sdf-jkl, timsaucer, xudong963, zhuqi-lucas. File an issue against this benchmark runner |
Rationale for this change
Hash-join key-equality verification (equal_rows_arr) checks every candidate row pair produced by a hash-bucket match. The current implementation calls JoinKeyComparator::is_equal per pair, which for each pair:
For single-column, high-fanout joins with near-100% match rates (long string keys are the worst case), that per-pair overhead dominates the join and measurably regresses throughput relative to the previous vectorized approach.
Benchmarking against main on the hj SQL benchmark suite (TPC-H SF10, interleaved runs to cancel drift) showed this cost concentrated in single-column-key queries:
What changes are included in this PR?