forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
55961: opt: transform InnerJoin + Values to Project r=rytaft a=erikgrinaker This commit adds an optimizer normalization rule that transforms inner joins with single-row `Values` into a projection, for decorrelating subqueries that only reference variables from the outer query. It also adds the optgen helper `MakeProjectionsFromValues` to convert a single-row `Values` into `Projections`. Release note (performance improvement): The optimizer now converts inner joins with single-row values expressions into projections. This allows decorrelation of subqueries that only reference variables from the outer query, such as `SELECT (SELECT value + 10) FROM table`. Resolves cockroachdb#45853. I would appreciate an extra pair of eyes on the new test case plans - the changes appear to make sense to me, but I'm not too familiar with the query engine just yet. Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
11 changed files
with
421 additions
and
399 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
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.