-
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
executor: fix the projection upon the indexLookUp in indexLookUpJoin can't get result. #12889
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
Codecov Report
@@ Coverage Diff @@
## master #12889 +/- ##
=======================================
Coverage 79.98% 79.98%
=======================================
Files 465 465
Lines 107188 107188
=======================================
Hits 85729 85729
Misses 14994 14994
Partials 6465 6465 |
/run-all-tests |
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 check whether this bug fix should cherry-pick to release-3.1 and release-3.0
executor/projection.go
Outdated
} | ||
|
||
func (e *ProjectionExec) open(ctx context.Context) error { | ||
// We have to initialize execution resources in here instead of in function "Open", |
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.
This comment is unnecessary.
@@ -2230,7 +2230,7 @@ func (builder *dataReaderBuilder) buildProjectionForIndexJoin(ctx context.Contex | |||
if int64(v.StatsCount()) < int64(builder.ctx.GetSessionVars().MaxChunkSize) { | |||
e.numWorkers = 0 | |||
} | |||
err = e.Open(ctx) | |||
err = e.open(ctx) |
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.
Can we try to refine the test case in the issue, and ensure IndexMergeJoin can be chosen?
b378621
to
a45097f
Compare
/rebuild |
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 |
/run-all-tests |
…ect/tidb into feature-add-udf-support * 'feature-add-udf-support' of https://github.com/JustProject/tidb: (26 commits) *: fix bug that the kill command doesn't work when the killed session is waiting for the pessimistic lock (pingcap#12852) executor: fix the projection upon the indexLookUp in indexLookUpJoin can't get result. (pingcap#12889) planner, executor: support create view on union (pingcap#12595) planner/cascades: introduce TransformationID in cascades planner (pingcap#12879) executor: fix data race in test (pingcap#12910) executor: reuse chunk row for insert on duplicate update (pingcap#12847) ddl: speed up tests (pingcap#12888) executor: speed up test (pingcap#12896) expression: implement vectorized evaluation for `builtinSecondSig` (pingcap#12886) expression: implement vectorized evaluation for `builtinJSONObjectSig` (pingcap#12663) expression: speed up builtinRepeatSig by using MergeNulls (pingcap#12674) expression: speed up unit tests under the expression package (pingcap#12887) store,kv: snapshot doesn't cache the non-exists kv entries lead to poor 'insert ignore' performance (pingcap#12872) executor: fix data race in `GetDirtyTable()` (pingcap#12767) domain: increase TTL to reduce the occurrence of reporting min startTS errors (pingcap#12578) executor: split test for speed up (pingcap#12881) executor: fix inconsistent of grants privileges with MySQL when executing `grant all on ...` (pingcap#12330) expression: implement vectorized evaluation for `builtinJSONUnquoteSig` (pingcap#12841) tune grpc connection count between tidb and tikv (pingcap#12884) Makefile: change test parallel to 8 (pingcap#12885) ...
…can't get result. (pingcap#12889)
What problem does this PR solve?
Fixes #12785
In
buildProjectionForIndexJoin
function, it callsProjectionExec.Open()
and recursive callsIndexLookUpExecutor.Open()
. In this function, IndexLookUp will re-calculatekvRanges
usinge.ranges
.In this case,
e.ranges
is not initiated and will build a empty range.What is changed and how it works?
Only init
ProjectExec
and don't recursive init childExec.The childExec will be initiated in other
buildxxxForIndexJoin
function.Check List
Tests
2.1 In master,
2.2 In this pr,
Code changes
Side effects
Related changes
Release note