From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rethink node-level representation of partial-aggregation modes.
Date: Sun, 26 Jun 2016 18:33:52 +0000
Message-ID: <E1bHEsS-0007YZ-QZ@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Rethink node-level representation of partial-aggregation modes.
The original coding had three separate booleans representing partial
aggregation behavior, which was confusing, unreadable, and error-prone,
not least because the booleans weren't always listed in the same order.
It was also inadequate for the allegedly-desirable future extension to
support intermediate partial aggregation, because we'd need separate
markers for serialization and deserialization in such a case.
Merge these bools into an enum "AggSplit" to provide symbolic names for
the supported operating modes (and document what those are). By assigning
the values of the enum constants carefully, we can treat AggSplit values
as options bitmasks so that tests of what to do aren't noticeably more
expensive than before.
While at it, get rid of Aggref.aggoutputtype. That's not needed since
commit 59a3795c2 got rid of setrefs.c's special-purpose Aggref comparison
code, and it likewise seemed more confusing than helpful.
Assorted comment cleanup as well (there's still more that I want to do
in that line).
catversion bump for change in Aggref node contents. Should be the last
one for partial-aggregation changes.
Discussion: <29309.1466699160@sss.pgh.pa.us>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/19e972d5580c655423572e3c870e47b5b7c346f6
Modified Files
--------------
src/backend/commands/explain.c | 4 +-
src/backend/executor/execQual.c | 29 ++----
src/backend/executor/nodeAgg.c | 173 ++++++++++++++------------------
src/backend/nodes/copyfuncs.c | 8 +-
src/backend/nodes/equalfuncs.c | 4 +-
src/backend/nodes/nodeFuncs.c | 2 +-
src/backend/nodes/outfuncs.c | 9 +-
src/backend/nodes/readfuncs.c | 8 +-
src/backend/optimizer/plan/createplan.c | 23 ++---
src/backend/optimizer/plan/planner.c | 97 +++++++++---------
src/backend/optimizer/plan/setrefs.c | 8 +-
src/backend/optimizer/prep/prepunion.c | 6 +-
src/backend/optimizer/util/clauses.c | 85 +++++++---------
src/backend/optimizer/util/pathnode.c | 13 +--
src/backend/parser/parse_func.c | 6 +-
src/backend/utils/adt/ruleutils.c | 9 +-
src/include/catalog/catversion.h | 2 +-
src/include/nodes/execnodes.h | 4 +-
src/include/nodes/nodes.h | 30 ++++++
src/include/nodes/plannodes.h | 4 +-
src/include/nodes/primnodes.h | 21 ++--
src/include/nodes/relation.h | 4 +-
src/include/optimizer/clauses.h | 5 +-
src/include/optimizer/pathnode.h | 6 +-
src/include/optimizer/planmain.h | 4 +-
src/include/optimizer/planner.h | 2 +-
26 files changed, 252 insertions(+), 314 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Rethink node-level representation of partial-aggregation modes.
In-Reply-To: <E1bHEsS-0007YZ-QZ@gemulon.postgresql.org>
References: <E1bHEsS-0007YZ-QZ@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox