Re: Eager aggregation, take 3

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Tender Wang <tndrwang(at)gmail(dot)com>, Paul George <p(dot)a(dot)george19(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Eager aggregation, take 3
Date: 2024-11-12 00:27:24
Message-ID: CAMbWs4-r3OWoThd6LMpr5d258HB0YVrwDHse8=ExUSVJ0uKXZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 12, 2024 at 1:30 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Nov 10, 2024 at 7:52 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > Hmm, currently we only consider grouped aggregation for eager
> > aggregation. For grouped aggregation, the window function's
> > arguments, as well as the PARTITION BY expressions, must appear in the
> > GROUP BY clause. That is to say, the depname column in the first
> > query, or the n column in the second query, will not be aggregated
> > into the partial groups. Instead, they will remain as they are as
> > input for the WindowAgg nodes. It seems to me that this ensures
> > that we're good with window functions. But maybe I'm wrong.
>
> Unfortunately, I don't know what you mean by grouped aggregation. I
> think of grouping and aggregation as synonyms, pretty much.

Ah, sorry for the confusion. By "grouped aggregation", I mean
aggregation with a GROUP BY clause, where we produce a result row for
each group. This contrasts with plain aggregation, where there is a
single result row for the whole query.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2024-11-12 00:33:33 Re: explain plans for foreign servers
Previous Message Heikki Linnakangas 2024-11-11 23:31:40 Re: POC: make mxidoff 64 bits