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

executor: split hashjoin into workers(part2) #39079

Merged
merged 10 commits into from
Nov 11, 2022
4 changes: 2 additions & 2 deletions executor/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,9 @@ func prepare4HashJoin(testCase *hashJoinTestCase, innerExec, outerExec Executor)
childrenUsedSchema := markChildrenUsedCols(e.Schema(), e.children[0].Schema(), e.children[1].Schema())
defaultValues := make([]types.Datum, e.buildSideExec.Schema().Len())
lhsTypes, rhsTypes := retTypes(innerExec), retTypes(outerExec)
e.probeWorker.joiners = make([]joiner, e.concurrency)
e.probeWorker.joiner = make([]joiner, e.concurrency)
for i := uint(0); i < e.concurrency; i++ {
e.probeWorker.joiners[i] = newJoiner(testCase.ctx, e.joinType, true, defaultValues,
e.probeWorker.joiner[i] = newJoiner(testCase.ctx, e.joinType, true, defaultValues,
nil, lhsTypes, rhsTypes, childrenUsedSchema, false)
}
memLimit := int64(-1)
Expand Down
3 changes: 1 addition & 2 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1448,9 +1448,8 @@ func (b *executorBuilder) buildHashJoin(v *plannercore.PhysicalHashJoin) Executo
isNAJoin := len(v.LeftNAJoinKeys) > 0
e.buildSideEstCount = b.buildSideEstCount(v)
childrenUsedSchema := markChildrenUsedCols(v.Schema(), v.Children()[0].Schema(), v.Children()[1].Schema())
e.probeWorker.joiners = make([]joiner, e.concurrency)
for i := uint(0); i < e.concurrency; i++ {
e.probeWorker.joiners[i] = newJoiner(b.ctx, v.JoinType, v.InnerChildIdx == 0, defaultValues,
e.probeWorkers[i].joiner = newJoiner(b.ctx, v.JoinType, v.InnerChildIdx == 0, defaultValues,
v.OtherConditions, lhsTypes, rhsTypes, childrenUsedSchema, isNAJoin)
}
executorCountHashJoinExec.Inc()
Expand Down
Loading