[gen4 planner] Move more horizon planning to operators#12750
Merged
systay merged 10 commits intovitessio:mainfrom Mar 30, 2023
Merged
[gen4 planner] Move more horizon planning to operators#12750systay merged 10 commits intovitessio:mainfrom
systay merged 10 commits intovitessio:mainfrom
Conversation
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
b8e8882 to
e97f05e
Compare
Signed-off-by: Andres Taylor <andres@planetscale.com>
frouioui
approved these changes
Mar 30, 2023
Member
frouioui
left a comment
There was a problem hiding this comment.
Left some comments and question, otherwise it looks good to me! This is a great progress 🙏🏻
Comment on lines
+69
to
+72
| if vterr, ok := err.(*vterrors.VitessError); ok && vterr.ID == "VT13001" { | ||
| // we encountered a bug. let's try to back out | ||
| return nil, errNotHorizonPlanned | ||
| } |
Comment on lines
+104
to
+105
| case qp.NeedsAggregation() || sel.Having != nil || sel.Limit != nil || isDerived || needsOrdering || qp.NeedsDistinct(): | ||
| return nil, errNotHorizonPlanned |
Member
There was a problem hiding this comment.
so this is some of the cases we do not handle in the Horizon Planning Operator today?
Signed-off-by: Andres Taylor <andres@planetscale.com>
GuptaManan100
approved these changes
Mar 30, 2023
Comment on lines
+132
to
+133
| // CopyDependencies copies the dependencies from one expression into the other | ||
| func (st *SemTable) Cloned(from, to sqlparser.SQLNode) { |
Contributor
There was a problem hiding this comment.
The name of the function doesn't match the comment.
| Predicates []sqlparser.Expr | ||
|
|
||
| // FinalPredicate is the evalengine expression that will finally be used. | ||
| // It contains the ANDed predicates in Predicates, with ColName:s replaced by Offset:s |
Contributor
There was a problem hiding this comment.
What does Colname:s mean? Also Offest:s?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While planning, we use two important types of data structures - logical plans and operators. We are moving more and more logic over to the operators. This PR moves planning of projections over to the operators.
Still to do is: ordering, limit, distinct and aggregation.
Related Issue(s)
Tracking issue: #11626
Other PRs in this series: #11622, #11680, #12506