-
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
planner: add warning when join hint has no arguments #15583
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15583 +/- ##
===========================================
Coverage ? 80.4083%
===========================================
Files ? 504
Lines ? 134649
Branches ? 0
===========================================
Hits ? 108269
Misses ? 17895
Partials ? 8485 |
@@ -2195,23 +2205,45 @@ func (b *PlanBuilder) pushTableHints(hints []*ast.TableOptimizerHint, nodeType n | |||
for _, hint := range hints { | |||
switch hint.HintName.L { |
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.
What about check hint.Tables
before the switch
. Then we can reduce much redundant code.
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, I have merged these codes. PTAL
…nt_warning # Conflicts: # planner/core/logical_plan_builder.go # planner/core/testdata/integration_suite_in.json
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
Your auto merge job has been accepted, waiting for 15678, 15773, 15552 |
/run-all-tests |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #15874 |
cherry pick to release-4.0 in PR #15875 |
What problem does this PR solve?
Problem Summary:
This PRs adds warning when join hint has no arguments.
warning message:
What is changed and how it works?
How it Works:
check whether the hint.Tables is empty.
Related changes
Check List
Tests
Release note
adds warning message when join hint has no arguments.