summaryrefslogtreecommitdiff
path: root/src/include/executor/nodeAgg.h
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-02-15 22:39:18 -0800
committerAndres Freund <andres@anarazel.de>2018-02-15 22:39:18 -0800
commit2a41507dab0f293ff241fe8ae326065998668af8 (patch)
tree30fe1118750ea9c2805bd38a7485390f4d381715 /src/include/executor/nodeAgg.h
parent773aec7aa98abd38d6d9435913bb8e14e392c274 (diff)
Revert "Do execGrouping.c via expression eval machinery."
This reverts commit 773aec7aa98abd38d6d9435913bb8e14e392c274. There's an unresolved issue in the reverted commit: It only creates one comparator function, but in for the nodeSubplan.c case we need more (c.f. FindTupleHashEntry vs LookupTupleHashEntry calls in nodeSubplan.c). This isn't too difficult to fix, but it's not entirely trivial either. The fact that the issue only causes breakage on 32bit systems shows that the current test coverage isn't that great. To avoid turning half the buildfarm red till those two issues are addressed, revert.
Diffstat (limited to 'src/include/executor/nodeAgg.h')
-rw-r--r--src/include/executor/nodeAgg.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index 24be7d2daa8..3b06db86fd8 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -102,12 +102,11 @@ typedef struct AggStatePerTransData
bool *sortNullsFirst;
/*
- * Comparators for input columns --- only set/used when aggregate has
- * DISTINCT flag. equalfnOne version is used for single-column
- * commparisons, equalfnMulti for the case of multiple columns.
+ * fmgr lookup data for input columns' equality operators --- only
+ * set/used when aggregate has DISTINCT flag. Note that these are in
+ * order of sort column index, not parameter index.
*/
- FmgrInfo equalfnOne;
- ExprState *equalfnMulti;
+ FmgrInfo *equalfns; /* array of length numDistinctCols */
/*
* initial value from pg_aggregate entry
@@ -271,8 +270,7 @@ typedef struct AggStatePerPhaseData
int numsets; /* number of grouping sets (or 0) */
int *gset_lengths; /* lengths of grouping sets */
Bitmapset **grouped_cols; /* column groupings for rollup */
- ExprState **eqfunctions; /* expression returning equality, indexed by
- * nr of cols to compare */
+ FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
Agg *aggnode; /* Agg node for phase data */
Sort *sortnode; /* Sort node for input ordering for phase */