summaryrefslogtreecommitdiff
path: root/src/include/executor/nodeAgg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/executor/nodeAgg.h')
-rw-r--r--src/include/executor/nodeAgg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index 4d1bd929990..1229c9d1ab9 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -49,6 +49,11 @@ typedef struct AggStatePerTransData
bool aggshared;
/*
+ * True for ORDER BY and DISTINCT Aggrefs that are not aggpresorted.
+ */
+ bool aggsortrequired;
+
+ /*
* Number of aggregated input columns. This includes ORDER BY expressions
* in both the plain-agg and ordered-set cases. Ordered-set direct args
* are not counted, though.
@@ -136,6 +141,9 @@ typedef struct AggStatePerTransData
TupleTableSlot *sortslot; /* current input tuple */
TupleTableSlot *uniqslot; /* used for multi-column DISTINCT */
TupleDesc sortdesc; /* descriptor of input tuples */
+ Datum lastdatum; /* used for single-column DISTINCT */
+ bool lastisnull; /* used for single-column DISTINCT */
+ bool haslast; /* got a last value for DISTINCT check */
/*
* These values are working state that is initialized at the start of an