Skip to content

Split use flags and RowRef in HashJoin#20079

Merged
CurtizJ merged 3 commits intomasterfrom
vdimir/fix-join-used-flag
Feb 10, 2021
Merged

Split use flags and RowRef in HashJoin#20079
CurtizJ merged 3 commits intomasterfrom
vdimir/fix-join-used-flag

Conversation

@vdimir
Copy link
Copy Markdown
Member

@vdimir vdimir commented Feb 4, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

  • Bugfix in StorageJoin

Ref #16991

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Feb 4, 2021
@vdimir vdimir marked this pull request as draft February 4, 2021 14:52
@vdimir vdimir force-pushed the vdimir/fix-join-used-flag branch from 2937f47 to 01a6e01 Compare February 5, 2021 13:20
@vdimir vdimir marked this pull request as ready for review February 5, 2021 13:21
@CurtizJ CurtizJ self-assigned this Feb 9, 2021
Copy link
Copy Markdown
Member

@CurtizJ CurtizJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly, that there was a following problem: in hash table, which is stored in StorageJoin, at first read the flag used was set for matched rows and then for next reads this data was reused and some or all rows were skipped?

@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Feb 10, 2021

@CurtizJ Yes, flags were stored inside hash table with row refs. So, it was shared between HashJoin instances pointing at the same RightTableData. To reset flags but do not rebuild whole hash table I split flags into separate array that have same size as hash table buffer and keep correspondence between it.

@CurtizJ CurtizJ merged commit ece7e87 into master Feb 10, 2021
@CurtizJ CurtizJ deleted the vdimir/fix-join-used-flag branch February 10, 2021 17:34
alesapin added a commit that referenced this pull request Feb 12, 2021
Backport #20079 to 21.1: Split use flags and RowRef in HashJoin
alesapin added a commit that referenced this pull request Feb 12, 2021
Backport #20079 to 20.12: Split use flags and RowRef in HashJoin
alesapin added a commit that referenced this pull request Feb 12, 2021
Backport #20079 to 21.2: Split use flags and RowRef in HashJoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants