Skip to content

Commit

Permalink
rename bac
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-jason committed Aug 7, 2018
1 parent 1aa436b commit a2dda9e
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 122 deletions.
10 changes: 5 additions & 5 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ func (b *executorBuilder) buildMergeJoin(v *plan.PhysicalMergeJoin) Executor {
e := &MergeJoinExec{
stmtCtx: b.ctx.GetSessionVars().StmtCtx,
baseExecutor: newBaseExecutor(b.ctx, v.Schema(), v.ExplainID(), leftExec, rightExec),
resultGenerator: newRecordJoiner(b.ctx, v.JoinType, v.JoinType == plan.RightOuterJoin,
resultGenerator: newJoinResultGenerator(b.ctx, v.JoinType, v.JoinType == plan.RightOuterJoin,
defaultValues, v.OtherConditions,
leftExec.retTypes(), rightExec.retTypes()),
}
Expand Down Expand Up @@ -818,9 +818,9 @@ func (b *executorBuilder) buildHashJoin(v *plan.PhysicalHashJoin) Executor {
defaultValues = make([]types.Datum, e.innerExec.Schema().Len())
}
}
e.resultGenerators = make([]recordJoiner, e.concurrency)
e.resultGenerators = make([]joinResultGenerator, e.concurrency)
for i := uint(0); i < e.concurrency; i++ {
e.resultGenerators[i] = newRecordJoiner(b.ctx, v.JoinType, v.InnerChildIdx == 0, defaultValues,
e.resultGenerators[i] = newJoinResultGenerator(b.ctx, v.JoinType, v.InnerChildIdx == 0, defaultValues,
v.OtherConditions, lhsTypes, rhsTypes)
}
metrics.ExecutorCounter.WithLabelValues("HashJoinExec").Inc()
Expand Down Expand Up @@ -1153,7 +1153,7 @@ func (b *executorBuilder) buildApply(apply *plan.PhysicalApply) *NestedLoopApply
if defaultValues == nil {
defaultValues = make([]types.Datum, v.Children()[v.InnerChildIdx].Schema().Len())
}
generator := newRecordJoiner(b.ctx, v.JoinType, v.InnerChildIdx == 0,
generator := newJoinResultGenerator(b.ctx, v.JoinType, v.InnerChildIdx == 0,
defaultValues, otherConditions, leftChild.retTypes(), rightChild.retTypes())
outerExec, innerExec := leftChild, rightChild
outerFilter, innerFilter := v.LeftConditions, v.RightConditions
Expand Down Expand Up @@ -1510,7 +1510,7 @@ func (b *executorBuilder) buildIndexLookUpJoin(v *plan.PhysicalIndexJoin) Execut
rowTypes: innerTypes,
},
workerWg: new(sync.WaitGroup),
resultGenerator: newRecordJoiner(b.ctx, v.JoinType, v.OuterIndex == 1, defaultValues, v.OtherConditions, leftTypes, rightTypes),
resultGenerator: newJoinResultGenerator(b.ctx, v.JoinType, v.OuterIndex == 1, defaultValues, v.OtherConditions, leftTypes, rightTypes),
indexRanges: v.Ranges,
keyOff2IdxOff: v.KeyOff2IdxOff,
}
Expand Down
2 changes: 1 addition & 1 deletion executor/index_lookup_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type IndexLookUpJoin struct {
joinResult *chunk.Chunk
innerIter chunk.Iterator

resultGenerator recordJoiner
resultGenerator joinResultGenerator

indexRanges []*ranger.Range
keyOff2IdxOff []int
Expand Down
6 changes: 3 additions & 3 deletions executor/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ type HashJoinExec struct {
innerIdx int

// We build individual resultGenerator for each join worker when use chunk-based execution,
// to avoid the concurrency of recordJoiner.chk and recordJoiner.selected.
resultGenerators []recordJoiner
// to avoid the concurrency of joinResultGenerator.chk and joinResultGenerator.selected.
resultGenerators []joinResultGenerator

outerKeyColIdx []int
innerKeyColIdx []int
Expand Down Expand Up @@ -562,7 +562,7 @@ type NestedLoopApplyExec struct {
outerFilter expression.CNFExprs
outer bool

resultGenerator recordJoiner
resultGenerator joinResultGenerator

outerSchema []*expression.CorrelatedColumn

Expand Down
Loading

0 comments on commit a2dda9e

Please sign in to comment.