-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
plan, parser: support JOIN hint for UPDATE/DELETE statements #6626
Conversation
@lzmhhh123 Please add some description for this PR. |
/run-all-tests |
parser/parser.y
Outdated
x.Where = $8.(ast.ExprNode) | ||
Priority: $3.(mysql.PriorityEnum), | ||
Quick: $4.(bool), | ||
IgnoreErr: $5.(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.
plz fix the code indent before $5.(bool),
ast/dml.go
Outdated
@@ -791,6 +791,8 @@ type DeleteStmt struct { | |||
Quick bool | |||
IsMultiTable bool | |||
BeforeFrom bool | |||
// TableHints represents the level Optimizer Hint |
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.
incomplete comment?
@@ -1998,60 +1998,67 @@ DoStmt: | |||
* | |||
*******************************************************************/ | |||
DeleteFromStmt: | |||
"DELETE" PriorityOpt QuickOptional IgnoreOptional "FROM" TableName IndexHintListOpt WhereClauseOptional OrderByOptional LimitClause | |||
"DELETE" TableOptimizerHints PriorityOpt QuickOptional IgnoreOptional "FROM" TableName IndexHintListOpt WhereClauseOptional OrderByOptional LimitClause |
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.
Seem that the TableOptimizerHints
is not used?
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.
Yeah, but it will cause yacc reduce conflict without this TableOptimizerHints
.
/run-all-tests |
ast/dml.go
Outdated
@@ -791,6 +791,8 @@ type DeleteStmt struct { | |||
Quick bool | |||
IsMultiTable bool | |||
BeforeFrom bool | |||
// TableHints represents the level Optimizer Hint for join type. |
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 mean "the table level optimizer hint"?
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.
Yeah. I just referred the previous comments.
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.
How about fixing these wrong comments in this PR?
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.
OK
… into dev/joinhintenhance
LGTM |
@winoros @lamxTyler PTAL |
LGTM |
* support high priority for DELETE/UPDATE statement * plan, parser: support JOIN hint for UPDATE/DELETE statements (#6626)
To support JOIN hints like
/*+ TiDB_SMJ */
inUPDATE
&DELETE
statements.