-
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 IGNORE_INDEX hint #12059
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.
LGTM
@@ -1972,7 +1974,7 @@ func (b *PlanBuilder) pushTableHints(hints []*ast.TableOptimizerHint, nodeType n | |||
preferAggType |= preferHashAgg | |||
case HintStreamAgg: | |||
preferAggType |= preferStreamAgg | |||
case HintIndex: | |||
case HintUseIndex: |
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 will happen if using both ignore_index(t, idx_a)
and use_index(t, idx_a)
in a sql block?
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 we need to add a test for it?
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.
Seems that we will ignore all indexes... I'll add test and fix it.
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.
now it works just like normal index hint. Added some tests, you can check it out.
Codecov Report
@@ Coverage Diff @@
## master #12059 +/- ##
===========================================
Coverage 81.6305% 81.6305%
===========================================
Files 453 453
Lines 98370 98370
===========================================
Hits 80300 80300
Misses 12413 12413
Partials 5657 5657 |
Add some tests and resolved conflict, PTAL. @lzmhhh123 @lamxTyler |
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 |
62d5096
to
f97ff2b
Compare
/run-all-tests |
What problem does this PR solve?
add
IGNORE_INDEX
hint and changeINDEX
intoUSE_INDEX
hint.What is changed and how it works?
Just handle
hintIgnoreIndex
as whathintIndex
do.Check List
Tests
Code changes
Side effects
Related changes
Release note