Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-19.2: colexec: fix OUTER hash joins in some cases #42438

Merged
merged 1 commit into from Nov 13, 2019

Conversation

@yuzefovich
Copy link
Contributor

yuzefovich commented Nov 12, 2019

Backport 1/1 commits from #42284.

/cc @cockroachdb/release


Previously, when emitting unmatched tuples, the hash joiner would set
the nulls that correspond to the unmatched side only once, before
transitioning into hjEmittingUnmatched state. However, we can emit
multiple batches while in this state, and we need to set nulls on every
one of them. Now this is fixed.

This fixes the problems with queries 13 and 20 of TPCH benchmark.

Fixes: #42130.
Fixes: #42047.

Release note (bug fix): OUTER HASH joins are now executed correctly via
the vectorized engine when NULLs are present.

Previously, when emitting unmatched tuples, the hash joiner would set
the nulls that correspond to the unmatched side only once, before
transitioning into hjEmittingUnmatched state. However, we can emit
multiple batches while in this state, and we need to set nulls on every
one of them. Now this is fixed.

This fixes the problems with queries 13 and 20 of TPCH benchmark.

Release note (bug fix): OUTER HASH joins are now executed correctly via
the vectorized engine when NULLs are present.
@yuzefovich yuzefovich requested a review from asubiotto Nov 12, 2019
@cockroach-teamcity

This comment has been minimized.

Copy link
Member

cockroach-teamcity commented Nov 12, 2019

This change is Reviewable

@yuzefovich

This comment has been minimized.

Copy link
Contributor Author

yuzefovich commented Nov 12, 2019

Note that this is not a "full" backport of the original PR (I omitted the tests and varying of output batch size of the hash joiner due to conflicts and reliance on some code that is not backported). I think it should be ok to merge it this way.

@yuzefovich yuzefovich merged commit e26c2f2 into cockroachdb:release-19.2 Nov 13, 2019
2 checks passed
2 checks passed
GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details
@yuzefovich yuzefovich deleted the yuzefovich:backport19.2-42284 branch Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.