diff options
Diffstat (limited to 'src/backend/optimizer/plan/planagg.c')
-rw-r--r-- | src/backend/optimizer/plan/planagg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index b85f48d6ffb..53fc2381ca0 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -328,17 +328,20 @@ find_minmax_aggs_walker(Node *node, List **context) * that differs for each of those equal values of the argument * expression makes the result predictable once again. This is a * niche requirement, and we do not implement it with subquery paths. + * In any case, this test lets us reject ordered-set aggregates + * quickly. */ if (aggref->aggorder != NIL) return true; + /* note: we do not care if DISTINCT is mentioned ... */ /* * We might implement the optimization when a FILTER clause is present - * by adding the filter to the quals of the generated subquery. + * by adding the filter to the quals of the generated subquery. For + * now, just punt. */ if (aggref->aggfilter != NULL) return true; - /* note: we do not care if DISTINCT is mentioned ... */ aggsortop = fetch_agg_sort_op(aggref->aggfnoid); if (!OidIsValid(aggsortop)) |