forked from cockroachdb/cockroach
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: fix internal error when exploration uncovers null-rejection
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 cockroachdb#100564. Fixes cockroachdb#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.
- Loading branch information
1 parent
cc9e0c6
commit 0a41269
Showing
2 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters