diff --git a/executor/aggregate.go b/executor/aggregate.go index d80a83488ce9b..27bda76e3a9fc 100644 --- a/executor/aggregate.go +++ b/executor/aggregate.go @@ -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 { @@ -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. diff --git a/executor/builder.go b/executor/builder.go index e11e0e8fc2dda..c66cc5182e665 100644 --- a/executor/builder.go +++ b/executor/builder.go @@ -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), } }