Skip to content
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, executor: build ColWithCmpFuncManager.TmpConstant for indexHashJoin.innerWorker individually #13714

Merged
merged 2 commits into from
Nov 25, 2019

Conversation

XuHuaiyu
Copy link
Contributor

@XuHuaiyu XuHuaiyu commented Nov 25, 2019

The same as #13669
and #13713

What problem does this PR solve?

Before this commit, the query result is not stable:

drop table if exists t,s
create table t(a int primary key auto_increment, b time)
create table s(a int, b time)
alter table s add index idx(a,b)
set @@tidb_index_join_batch_size=4;set @@tidb_init_chunk_size=1;set @@tidb_max_chunk_size=32; set @@tidb_index_lookup_join_concurrency=15;
-- insert 64 rows into `t`
-- insert 64 rows into `s`
select /*+ INL_HASH_JOIN(s) */ count(*) from t join s use index(idx) on s.a = t.a and s.b < t.b;

What is changed and how it works?

Build ColWithCmpFuncManager.TmpConstant for indexHashJoin.innerWorker individually.
Thus the modifications triggered by each inner worker will not affect the others.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

N/A

Related changes

N/A

Release note

N/A

@XuHuaiyu XuHuaiyu added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Nov 25, 2019
@XuHuaiyu
Copy link
Contributor Author

/run-all-tests

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@XuHuaiyu
Copy link
Contributor Author

/run-unit-tests

@XuHuaiyu XuHuaiyu added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 25, 2019
@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #13714 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #13714   +/-   ##
===========================================
  Coverage   80.0542%   80.0542%           
===========================================
  Files           473        473           
  Lines        116446     116446           
===========================================
  Hits          93220      93220           
  Misses        15866      15866           
  Partials       7360       7360

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 25, 2019

/run-all-tests

@sre-bot sre-bot merged commit 189d89e into pingcap:master Nov 25, 2019
@XuHuaiyu XuHuaiyu deleted the indexhashjoin_concurrency branch November 25, 2019 06:48
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants