diff options
| author | Tom Lane | 2016-06-26 16:08:12 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-06-26 16:08:12 +0000 |
| commit | 59a3795c2589a0e6dfe4d9a886de9423b3f8b057 (patch) | |
| tree | c8481f4c3fbf105d69c6d5ecf647644238b0247a /src/include/optimizer | |
| parent | e3ad3ffa68193dd889a9cea9d840bf4613bd680b (diff) | |
Simplify planner's final setup of Aggrefs for partial aggregation.
Commit e06a38965's original coding for constructing the execution-time
expression tree for a combining aggregate was rather messy, involving
duplicating quite a lot of code in setrefs.c so that it could inject
a nonstandard matching rule for Aggrefs. Get rid of that in favor of
explicitly constructing a combining Aggref with a partial Aggref as input,
then allowing setref's normal matching logic to match the partial Aggref
to the output of the lower plan node and hence replace it with a Var.
In passing, rename and redocument make_partialgroup_input_target to have
some connection to what it actually does.
Diffstat (limited to 'src/include/optimizer')
| -rw-r--r-- | src/include/optimizer/planner.h | 2 | ||||
| -rw-r--r-- | src/include/optimizer/tlist.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index 4161bcf8d7..0d20976635 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -46,6 +46,8 @@ extern bool is_dummy_plan(Plan *plan); extern RowMarkType select_rowmark_type(RangeTblEntry *rte, LockClauseStrength strength); +extern void mark_partial_aggref(Aggref *agg, bool serialize); + extern Path *get_cheapest_fractional_path(RelOptInfo *rel, double tuple_fraction); diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index de58db1db2..0d745a0891 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -61,7 +61,6 @@ extern void add_column_to_pathtarget(PathTarget *target, extern void add_new_column_to_pathtarget(PathTarget *target, Expr *expr); extern void add_new_columns_to_pathtarget(PathTarget *target, List *exprs); extern void apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target); -extern void apply_partialaggref_adjustment(PathTarget *target); /* Convenience macro to get a PathTarget with valid cost/width fields */ #define create_pathtarget(root, tlist) \ |
