Repository navigation
Improve HashJoin main loop - #82308
Conversation
c9f269b to
4a89b59
Compare
| { | ||
| constexpr JoinFeatures<KIND, STRICTNESS, MapsTemplate> join_features; | ||
|
|
||
| auto & mapped = find_result.getMapped(); |
There was a problem hiding this comment.
this code moved as-is from l.462
| JoinCommon::JoinMask::Kind join_mask_kind, | ||
| typename AddedColumns, | ||
| typename Selector> | ||
| size_t HashJoinMethods<KIND, STRICTNESS, MapsTemplate>::joinRightColumns( |
There was a problem hiding this comment.
It has the same code as the generic joinRightColumns, but specialised for the case of one condition (i.e. one map)
|
I have to move optimizations for the multi-map case into a separate PR, because I'm having some issues with the arm build, and I don't want to delay this PR because of another CI problem. |
|
|
||
| namespace DB | ||
| { | ||
| template class HashJoinMethods<JoinKind::Full, JoinStrictness::RightAny, HashJoin::MapsAll>; |
There was a problem hiding this comment.
Have you split it because it became heavier and started to hit the limit again?
There was a problem hiding this comment.
Yep. And one inaccurate move could push us over the limit again, even after this split )
|
|
||
| explicit JoinMask(bool value, size_t size) | ||
| JoinMask(bool value, size_t size) | ||
| : column(ColumnUInt8::create(size, value)) |
There was a problem hiding this comment.
Do we actually use column in such case? Can't we just check kind in isRowFiltered ?
There was a problem hiding this comment.
That would make a lot of sense. Let me fix that.
|
Hi @nickitat @qoega @KochetovNicolai @vdimir — while reviewing this PR I found the following:
Happy to discuss — close anything that's wrong or already addressed. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Performance of
HashJoinoptimised by removing the additional loop over hash maps in the typical case of only one key column, alsonull_mapandjoin_maskchecks are eliminated when they're alwaystrue/false.Part of: #78539