-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: add session variable "tidb_enable_cascades_planner" #7879
Conversation
/run-all-tests |
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
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
@@ -289,6 +289,9 @@ type SessionVars struct { | |||
// EnableTablePartition enables table partition feature. | |||
EnableTablePartition bool | |||
|
|||
// EnableCascadesPlanner enables the cascades planner. | |||
EnableCascadesPlanner bool |
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.
do we need half-open stauts that plan/exec new & old at same time for compare and test?
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.
yes, will be added once the new planner is functionally work.
What problem does this PR solve?
This PR is split from #7869
What is changed and how it works?
tidb_enable_cascades_planner
to enable the new cascades planner.Optimize()
out of the packageplannercore
toplanner
, chose the query planner according to the session variabletidb_enable_cascades_planner
Because the cascades planner is not implemented yet, an error will be returned if we use the cascades planner to process a query:
Check List
Tests
Code changes