planner: fix the row count for index join use the PK in inner side#65190
planner: fix the row count for index join use the PK in inner side#65190ti-chi-bot[bot] merged 5 commits intopingcap:masterfrom
Conversation
|
Hi @Reminiscent. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #65190 +/- ##
================================================
- Coverage 77.8537% 77.6569% -0.1968%
================================================
Files 1978 1902 -76
Lines 542181 529860 -12321
================================================
- Hits 422108 411473 -10635
+ Misses 118413 118381 -32
+ Partials 1660 6 -1654
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest-required |
|
/retest |
| maxOneRow := false | ||
| if indexJoinResult.chosenPath.Index.Unique && indexJoinResult.usedColsLen == len(indexJoinResult.chosenPath.FullIdxCols) { | ||
| l := len(indexJoinResult.chosenAccess) | ||
| if l == 0 { | ||
| maxOneRow = true | ||
| } else { | ||
| sf, ok := indexJoinResult.chosenAccess[l-1].(*expression.ScalarFunction) | ||
| maxOneRow = ok && (sf.FuncName.L == ast.EQ) | ||
| } | ||
| } |
There was a problem hiding this comment.
Could we wrap this part of code as a separate function? Then we can avoid some duplicated code.
| indexJoinResult *indexJoinPathResult) (rangeInfo string, maxOneRow bool) { | ||
| rangeInfo = indexJoinPathRangeInfo(sctx, outerJoinKeys, indexJoinResult) | ||
| maxOneRow = false | ||
| if indexJoinResult.chosenPath.Index.Unique && indexJoinResult.usedColsLen == len(indexJoinResult.chosenPath.FullIdxCols) { |
|
/review |
|
/retest-required |
|
/retest |
a3ed703 to
e60bf2e
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e60bf2e to
938a0db
Compare
|
/retest |
4 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
c44d22c to
9cce572
Compare
|
@Reminiscent: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test mysql-test |
|
@Reminiscent: The specified target(s) for Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherrypick release-8.5 |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@Reminiscent: new pull request created to branch DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #65183
Problem Summary:
fix the row count for index join use the PK in inner side
What changed and how does it work?
Use the same way in the
buildIndexJoinInner2IndexScanfunction(tidb/pkg/planner/core/exhaust_physical_plans.go
Lines 918 to 927 in 0f706ff
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.