-
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
*: support "drop global binding" #10193
*: support "drop global binding" #10193
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10193 +/- ##
================================================
+ Coverage 77.9221% 77.9347% +0.0126%
================================================
Files 407 407
Lines 82911 83049 +138
================================================
+ Hits 64606 64724 +118
- Misses 13512 13524 +12
- Partials 4793 4801 +8 |
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 |
…houg37/tidb into plan-management-drop-global-binding
|
||
for i := len(metas) - 1; i >= 0; i-- { | ||
if meta.isSame(meta) { | ||
metas = append(metas[:i], metas[i+1:]...) |
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.
If the slice reallocates, the metas
will be different from c[hash]
? And so with the removeStaleBindMetas
.
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.
Never mind, remove won't reallocate.
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 |
What problem does this PR solve?
associated iusse: #8935
feature: support drop global binding
use case:
create table t(i int, s varchar(20))
create index index_t on t(i,s)
create global binding for select * from t using select * from t use index for join(index_t)
If we want to drop the global binding of
select * from t
, we just executedrop global binding for select * from t
What is changed and how it works?
Check List
Tests
Code changes
N/A
Related changes
N/A