-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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-22.2: opt: fix internal error when exploration uncovers null-rejection #100668
release-22.2: opt: fix internal error when exploration uncovers null-rejection #100668
Conversation
79dbcaa
to
2060526
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball and @mgartner)
It is possible for exploration rules to reveal opportunities to null-reject (simplify) an outer join that were not visible during normalization. Previously, this would cause an internal error, since it was assumed null-rejection would never be requested by an expression that can prove the requested column is non-null. This patch removes the assertion and instead removes any proven non-null columns from the requested null-rejection column set. Note that this solution is orthogonal to improving null-rejection during normalization - one instance of this is tracked in #100564. Fixes #100559 Release note (bug fix): Fixed a bug existing since before 22.1 that could cause an internal error in rare cases for a query with outer joins that can be simplified to non-outer joins and at least one semi-join.
2060526
to
902e358
Compare
Backport 1/1 commits from #100565 on behalf of @DrewKimball.
/cc @cockroachdb/release
It is possible for exploration rules to reveal opportunities to null-reject (simplify) an outer join that were not visible during normalization. Previously, this would cause an internal error, since it was assumed null-rejection would never be requested by an expression that can prove the requested column is non-null. This patch removes the assertion and instead removes any proven non-null columns from the requested null-rejection column set. Note that this solution is orthogonal to improving null-rejection during normalization - one instance of this is tracked in #100564.
Fixes #100559
Release note (bug fix): Fixed a bug existing since before 22.1 that could cause an internal error in rare cases for a query with outer joins that can be simplified to non-outer joins and at least one semi-join.
Release justification: low-risk fix for optimizer internal error