mirror of https://github.com/citusdata/citus.git
Initialize count_agg_clauses argument to 0.
count_agg_clause *adds* the cost of the aggregates to the state variable, it doesn't reinitialize it. That is intentional, as it is used to incrementally add costs in some places.pull/834/head
parent
a6150c2916
commit
6d050bc9f8
|
@ -134,6 +134,7 @@ BuildAggregatePlan(Query *masterQuery, Plan *subPlan)
|
||||||
Assert(masterQuery->hasAggs || masterQuery->groupClause);
|
Assert(masterQuery->hasAggs || masterQuery->groupClause);
|
||||||
|
|
||||||
aggregateTargetList = masterQuery->targetList;
|
aggregateTargetList = masterQuery->targetList;
|
||||||
|
memset(&aggregateCosts, 0, sizeof(AggClauseCosts));
|
||||||
count_agg_clauses(NULL, (Node *) aggregateTargetList, &aggregateCosts);
|
count_agg_clauses(NULL, (Node *) aggregateTargetList, &aggregateCosts);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue