-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor: move more code from logical plans to ops #14287
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
scatterAsWarns := directives.IsSet(sqlparser.DirectiveScatterErrorsAsWarnings) | ||
timeout := queryTimeout(directives) | ||
multiShardAutoCommit := directives.IsSet(sqlparser.DirectiveMultiShardAutocommit) | ||
return &queryHints{ | ||
scatterErrorsAsWarnings: scatterAsWarns, | ||
multiShardAutocommit: multiShardAutoCommit, | ||
queryTimeout: timeout, | ||
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
if err != nil { | ||
return nil, vterrors.Wrap(err, "unexpected expression in LIMIT") | ||
} | ||
plan.elimit.Count = pv | ||
|
||
if limit.Offset != nil { | ||
pv, err = evalengine.Translate(limit.Offset, nil) | ||
if err != nil { | ||
return nil, vterrors.Wrap(err, "unexpected expression in OFFSET") | ||
} | ||
plan.elimit.Offset = pv | ||
} | ||
|
||
return plan, nil |
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.
Shouldn't we use vterrors
errors here?
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.
I just moved this method from postprocess.go
. It's not wrong to use Wrap
, right?
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.
Awesome refactoring! No test expectations have changed and this is 💯 Thank you!
Description
We have good support for rewriting our query plans in the operator side of the planner. This PR moves a few constructs that were still planned on the logicalPlan structures over to the operators.
The remaining responsibility of the logicalPlan implementations is now to build the engine primitive tree.
Related Issue(s)
Tracking issue #11626
Checklist
Deployment Notes