-
Notifications
You must be signed in to change notification settings - Fork 490
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
parser: add plan recreator statement #1278
Conversation
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.
Rest LGTM. BTW, the document is internal, and there is no corresponding RFC on github.
|
||
$$ = x | ||
} | ||
| "PLAN" "RECREATOR" "DUMP" "EXPLAIN" "ANALYZE" "SLOW" "QUERY" WhereClauseOptional OrderByOptional SelectStmtLimitOpt |
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 you think AnalyzeOptional
will better? Not a necessary change request.
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.
Agree with you. I'll modify it later.
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.
When I added AnalyzeOptional
, I found that this abstraction seemed not necessary but added more work. I currently prefer not to modify this.
Here is a description of this feature in pingcap/tidb#26325. This is the new feature for Sprint 4, I'll add documents visible to everyone before this feature GA. Is this OK for you? |
@rebelice Sure. |
ast/misc.go
Outdated
@@ -343,6 +343,11 @@ func (n *PlanRecreatorStmt) Accept(v Visitor) (Node, bool) { | |||
return n, false | |||
} | |||
n.Stmt = node.(StmtNode) | |||
stmt, ok := n.Stmt.Accept(v) |
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.
Accept twice?
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.
Sorry about that. Fixed.
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
parser.y
Outdated
@@ -5582,6 +5586,7 @@ UnReservedKeyword: | |||
| "DAY" | |||
| "DEALLOCATE" | |||
| "DO" | |||
| "DUMP" |
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.
It's not in the UnReservedKeyword list:
https://dev.mysql.com/doc/refman/8.0/en/keywords.html
It should be NotKeyword?
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.
updated all
parser.y
Outdated
@@ -5624,6 +5629,7 @@ UnReservedKeyword: | |||
| "PROXY" | |||
| "QUICK" | |||
| "REBUILD" | |||
| "RECREATOR" |
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.
ditto
parser.y
Outdated
@@ -5719,6 +5725,7 @@ UnReservedKeyword: | |||
| "PROFILES" | |||
| "MICROSECOND" | |||
| "MINUTE" | |||
| "PLAN" |
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.
ditto ... plan is also not a keyword
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 862cea8
|
What problem does this PR solve?
This is a step in tidb/issues/26325
What is changed and how it works?
Add
PLAN RECREATOR
statementCheck List
Tests
Code changes
Side effects
Related changes