perf: specialize single-column hash-join key equality check - #24067
Draft
shehab-ali wants to merge 4 commits into
Draft
perf: specialize single-column hash-join key equality check#24067shehab-ali wants to merge 4 commits into
shehab-ali wants to merge 4 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24067 +/- ##
==========================================
+ Coverage 80.75% 80.88% +0.13%
==========================================
Files 1096 1102 +6
Lines 373582 375967 +2385
Branches 373582 375967 +2385
==========================================
+ Hits 301686 304104 +2418
+ Misses 53893 53759 -134
- Partials 18003 18104 +101 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?