-
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: fix index out of range in constructIndexJoinInnerSideTask #54534
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @joechenrh! |
Hi @joechenrh. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
Hi @joechenrh. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
/ok-to-test |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54534 +/- ##
================================================
- Coverage 74.7249% 70.5074% -4.2176%
================================================
Files 1558 1559 +1
Lines 363817 435869 +72052
================================================
+ Hits 271862 307320 +35458
- Misses 72284 108403 +36119
- Partials 19671 20146 +475
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -1455,12 +1455,13 @@ func (p *LogicalJoin) constructIndexJoinInnerSideTask(dsCopTask *CopTask, ds *Da | |||
ds.TableInfo.GetPartitionInfo() == nil { | |||
if len(path.IdxCols) < len(groupByCols) { | |||
preferStream = false |
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.
Please add the test cases 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.
You may refer to the implementation in pkg/planner/core/issuetest/planner_issue_test.go.
/retest |
} | ||
p = p.(base.PhysicalPlan).Children()[0] | ||
} | ||
require.True(t, ok) |
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.
You can use tk.MustQuery("explain xxx")
to check whether the planner is right.
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.
Just align with other test case name
@@ -86,3 +86,33 @@ func Test53726(t *testing.T) { | |||
" └─TableReader_11 2.00 root data:TableFullScan_10", | |||
" └─TableFullScan_10 2.00 cop[tikv] table:t7 keep order:false")) | |||
} | |||
|
|||
func Test54535(t *testing.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.
func Test54535(t *testing.T) { | |
func TestIssue54535(t *testing.T) { |
/retest-required |
@joechenrh Please sync the code with master. |
/retest-required |
@joechenrh: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #54535
Problem Summary:
When set system variable
tidb_enable_inl_join_inner_multi_pattern
toON
, the following SQL will get an error.What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.