Repository navigation
Fix parallel_hash join with additional filters in ON clause - #72993
Conversation
|
This is an automated comment for commit 206d515 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
| template <JoinKind KIND, JoinStrictness STRICTNESS, typename MapsTemplate> | ||
| template <typename KeyGetter, typename Map, typename AddedColumns> | ||
| template <typename KeyGetter, typename Map, typename AddedColumns, typename Selector> | ||
| size_t HashJoinMethods<KIND, STRICTNESS, MapsTemplate>::joinRightColumnsWithAddtitionalFilter( |
There was a problem hiding this comment.
so the difference between parallel_hash and hash is that former uses pair (block, selector) instead of just blocks. selector is list of row numbers that were selected by hash. and the problem is that i forgot to support it in this method that is called exactly when we have a complex ON clause with additional filters, like
SELECT t1.*, t2.* FROM t1 LEFT JOIN t2 ON t1.key = t2.key AND (t1.key < t2.a OR t1.a % 2 = 0)in theory we don't support such ON conditions with parallel_hash, but turned out they still might be executed with default join algorithm (which is hash,parallel_hash,direct). so instead of fixing logic that rejects such queries with parallel_hash i decided to support it. i'm not aware of reasons for it not to work, neither does Vladimir.
|
|
…lters in `ON` clause
…lters in `ON` clause
Backport #72993 to 24.11: Fix `parallel_hash` join with additional filters in `ON` clause
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed bug in
parallel_hashJOIN method that might appear when query has complex condition in theONclause with inequality filters.