-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Simplify projections #1936
Simplify projections #1936
Conversation
Generated stored columns prototype
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.
LGTM
// of optimizations local to this specific node. Eventually there should be a | ||
// top level optimizer with a switch for every type. | ||
|
||
func factoryBuildProject(p *plan.Project) (sql.Node, error) { |
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.
What is this name?
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.
you want me to just make it factory.BuildProject
to start with? splitting it off into a package seemed premature
View into an add-on feature to name resolution. Not intended for merging.
This is an example of a simplification rule that optimizes a node before it is added to a plan. In this case, we are deduplicating projection nodes at a point when we have the most tagging metadata about expression ids. We do not remove projections when a subquery expression backreferences an alias in the same scope. This will revert many of the extra projections in the earlier PRs.