diff options
author | Jeff Davis <jdavis@postgresql.org> | 2020-03-04 17:20:20 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2020-03-04 17:29:18 -0800 |
commit | c954d49046504bde0a80b5fec53f4321dd88f1ea (patch) | |
tree | 66ffd45e5be805255584236657ae1e336f541688 /src/include/executor/executor.h | |
parent | 3ed2005ff595d349276e5b2edeca1a8100b08c87 (diff) |
Extend ExecBuildAggTrans() to support a NULL pointer check.
Optionally push a step to check for a NULL pointer to the pergroup
state.
This will be important for disk-based hash aggregation in combination
with grouping sets. When memory limits are reached, a given tuple may
find its per-group state for some grouping sets but not others. For
the former, it advances the per-group state as normal; for the latter,
it skips evaluation and the calling code will have to spill the tuple
and reprocess it in a later batch.
Add the NULL check as a separate expression step because in some
common cases it's not needed.
Discussion: https://postgr.es/m/20200221202212.ssb2qpmdgrnx52sj%40alap3.anarazel.de
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r-- | src/include/executor/executor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 81fdfa4add3..94890512dc8 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -255,7 +255,7 @@ extern ExprState *ExecInitQual(List *qual, PlanState *parent); extern ExprState *ExecInitCheck(List *qual, PlanState *parent); extern List *ExecInitExprList(List *nodes, PlanState *parent); extern ExprState *ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase, - bool doSort, bool doHash); + bool doSort, bool doHash, bool nullcheck); extern ExprState *ExecBuildGroupingEqual(TupleDesc ldesc, TupleDesc rdesc, const TupleTableSlotOps *lops, const TupleTableSlotOps *rops, int numCols, |