-
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 the table name of indexHint cannot be found (#15517) #15762
planner: add warning when the table name of indexHint cannot be found (#15517) #15762
Conversation
Signed-off-by: sre-bot <sre-bot@pingcap.com>
/run-all-tests |
/run-unit-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.
@francis0407 Please resolve conflicts.
…lease-3.1-dd141728a329 # Conflicts: # planner/core/testdata/integration_suite_in.json # planner/core/testdata/integration_suite_out.json
@zz-jason, @eurekaka, @XuHuaiyu, @lzmhhh123, PTAL. |
1 similar comment
@zz-jason, @eurekaka, @XuHuaiyu, @lzmhhh123, PTAL. |
@sre-bot, please update your pull request. |
@zz-jason, @eurekaka, @XuHuaiyu, @lzmhhh123, PTAL. |
PTAL @zz-jason @lzmhhh123 |
{ | ||
"name": "TestReadFromStorageHint", | ||
"cases": [ | ||
"desc select avg(a) from t", | ||
"desc select /*+ read_from_storage(tiflash[t]) */ avg(a) from t", | ||
"desc select /*+ read_from_storage(tiflash[t]) */ sum(a) from t", | ||
"desc select /*+ read_from_storage(tiflash[t]) */ sum(a+1) from t", | ||
"desc select /*+ read_from_storage(tiflash[t]) */ sum(isnull(a)) from t", | ||
"desc select * from tt where (tt.a > 1 and tt.a < 20) or (tt.a >= 30 and tt.a < 55)", | ||
"desc select /*+ read_from_storage(tiflash[tt]) */ * from tt where (tt.a > 1 and tt.a < 20) or (tt.a >= 30 and tt.a < 55)", | ||
"desc select * from ttt order by ttt.a desc", | ||
"desc select /*+ read_from_storage(tiflash[ttt]) */ * from ttt order by ttt.a desc", | ||
"desc select /*+ read_from_storage(tiflash[ttt]) */ * from ttt order by ttt.a" | ||
] | ||
}, | ||
{ | ||
"name": "TestReadFromStorageHintAndIsolationRead", | ||
"cases": [ | ||
"desc select /*+ read_from_storage(tikv[t], tiflash[t]) */ avg(a) from t", | ||
"desc select /*+ read_from_storage(tikv[t]) */ avg(a) from t", | ||
"desc select /*+ read_from_storage(tiflash[t]) */ avg(a) from t" | ||
] | ||
}, |
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.
These tests have been involved in integration_serial_suite_in.json
. Is it correct to re-present 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.
Yeah, that's a mistake. I have removed them in the latest commit. PTAL
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
/run-all-tests |
1 similar comment
/run-all-tests |
@sre-bot merge failed. |
/run-integration-common-test |
/run-integration-common-test |
cherry-pick #15517 to release-3.1
What problem does this PR solve?
Problem Summary:
Throw a warning when the index hint is not applicable(i.e. cannot find the table).
What is changed and how it works?
What's Changed:
Before this PR:
After this PR:
How it Works:
Check if there are unused tableHints after building the select statement.
Check List
Tests