-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: add exploration rules to hoist project from under join
UPSERTs with virtual columns result in plans that can't utilize lookup joins because of a Project inside a left join. This change adds two exploration rules that try to pull up the Project, allowing other rules to fire on the resulting join. For inner joins, this is a trivial transformation (as long as the ON condition doesn't refer to a projection). For the right side of left joins (the UPSERT case), this is more complicated: we have to find a canary column from the right side. Fortunately, for the typical `a=b` join condition, `a` needs to be non-NULL, so we can use such a column as canary. Release note: None
- Loading branch information
1 parent
0870e88
commit f5a6fb0
Showing
11 changed files
with
1,135 additions
and
340 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
Oops, something went wrong.