Skip to content

Commit

Permalink
executor: refine HashAgg.Close when unparallelExec (#10656)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao authored and winkyao committed May 30, 2019
1 parent 80bea5a commit 5ea2830
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (e *HashAggExec) Close() error {
e.childResult = nil
e.groupSet = nil
e.partialResultMap = nil
return nil
return e.baseExecutor.Close()
}
// `Close` may be called after `Open` without calling `Next` in test.
if !e.prepared {
Expand All @@ -214,7 +214,7 @@ func (e *HashAggExec) Close() error {
}
for range e.finalOutputCh {
}
return errors.Trace(e.baseExecutor.Close())
return e.baseExecutor.Close()
}

// Open implements the Executor Open interface.
Expand Down
1 change: 1 addition & 0 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,7 @@ func (b *executorBuilder) buildProjBelowAgg(aggFuncs []*aggregation.AggFuncDesc,

return &ProjectionExec{
baseExecutor: newBaseExecutor(b.ctx, expression.NewSchema(projSchemaCols...), projFromID, src),
numWorkers: b.ctx.GetSessionVars().ProjectionConcurrency,
evaluatorSuit: expression.NewEvaluatorSuite(projExprs, false),
}
}
Expand Down

0 comments on commit 5ea2830

Please sign in to comment.