public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zhihong Yu <[email protected]>
To: David Rowley <[email protected]>
Cc: Andy Fan <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Subject: Re: Window Function "Run Conditions"
Date: Thu, 7 Apr 2022 15:08:10 -0700
Message-ID: <CALNJ-vTuJ_-P5SG=Lq+5nO8=A3ibbtNPSqgHyG2p6nS7sNdLYw@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvq=UfYDnEB5eBEXjsNg-HvpFazZYSGbTzqp9iGicgMqww@mail.gmail.com>
References: <CAApHDvqvp3At8++yF8ij06sdcoo1S_b2YoaT9D4Nf+MObzsrLQ@mail.gmail.com>
<CAApHDvrxxkc9dgoRJUHy6U+XmGjSXRF=fQ-_U1-EvzTjCA9XKw@mail.gmail.com>
<CALNJ-vSRgdOsMx-oiOZcMJzcxoRCo0nJr=U8us4eJR8R6n9ZtA@mail.gmail.com>
<CAApHDvpiAUmUMTETAua8XCLFJiFhsZkCwuiW50KDvehexA-SLA@mail.gmail.com>
<CAKU4AWq5MB_inrYUwPQYXU1fCopCwgYK53N2uYGYFBH3QEhZMA@mail.gmail.com>
<CAApHDvp8PSY3GJXNzzrBPJtzRgQ-C85OPy-bypFGmwaT3AjCjQ@mail.gmail.com>
<CAKU4AWrWzXFuGW4d3YTu=TJSWQKTB=J3E8S_5zyuLNR7npomAA@mail.gmail.com>
<CAApHDvqtwE4bZxAdk+LQgVkKM+Em-sHybON_OX4YbFs+sQUKWg@mail.gmail.com>
<CAApHDvoe=MqH66pDWynUtdammYHiB8m+zE7LvL_CGuxm1yK4BQ@mail.gmail.com>
<CAApHDvpYYndDJfGCmNA-o60VLb8D9OB1deh-qcsTiDjxVcFg_w@mail.gmail.com>
<[email protected]>
<CAApHDvp+rzxGh58hc3Fmr90PR-M=JOg96X0B5tfvY4pTKqNa3g@mail.gmail.com>
<CAKU4AWoiqPd_DdOA_0PWZ_e9cV6e1yP6F0VmxaLjedwTWQtBJA@mail.gmail.com>
<CAKU4AWpmDGMxQ3nJfj=awQAgcL-jP2p67MtpiHFZX77NaZ2hxQ@mail.gmail.com>
<CAApHDvrU132PxjuLakFrQhjR_b40LHAqhCzk-q2iGOST+-6dCw@mail.gmail.com>
<CAKU4AWrzzC4GCe2Mo_fYxc_SY=Ss1i0x-AEMjP_mxZYe6aMw=w@mail.gmail.com>
<CAApHDvpou0r+AOT9JZZEsiANQY=w=BTiRXgWR230NzOG7D3VUg@mail.gmail.com>
<CALNJ-vTaG0i+Sx4bruXDKNnppfMJS0nt7E=7Roo7VXAuxZFWiw@mail.gmail.com>
<CAApHDvrqaRrmS6Ee7hQ5NfRpfNGGS+Y0dhootWvkyUxMeoTm7w@mail.gmail.com>
<CAApHDvq=UfYDnEB5eBEXjsNg-HvpFazZYSGbTzqp9iGicgMqww@mail.gmail.com>
On Thu, Apr 7, 2022 at 7:11 AM David Rowley <[email protected]> wrote:
> On Thu, 7 Apr 2022 at 19:01, David Rowley <[email protected]> wrote:
> >
> > On Thu, 7 Apr 2022 at 15:41, Zhihong Yu <[email protected]> wrote:
> > > + * We must keep the original qual in place if there is
> a
> > > + * PARTITION BY clause as the top-level WindowAgg
> remains in
> > > + * pass-through mode and does nothing to filter out
> unwanted
> > > + * tuples.
> > > + */
> > > + *keep_original = false;
> > >
> > > The comment talks about keeping original qual but the assignment uses
> the value false.
> > > Maybe the comment can be rephrased so that it matches the assignment.
> >
> > Thanks. I've just removed that comment locally now. You're right, it
> > was out of date.
>
> I've attached the updated patch with the fixed comment and a few other
> comments reworded slightly.
>
> I've also pgindented the patch.
>
> Barring any objection, I'm planning to push this one in around 10 hours
> time.
>
> David
>
Hi,
+ WINDOWAGG_PASSTHROUGH_STRICT /* Pass-through plus don't store new
+ * tuples during spool */
I think the comment in code is illustrative:
+ * STRICT pass-through mode is required for the top
window
+ * when there is a PARTITION BY clause. Otherwise we
must
+ * ensure we store tuples that don't match the
+ * runcondition so they're available to WindowAggs
above.
If you think the above is too long where WINDOWAGG_PASSTHROUGH_STRICT is
defined, maybe point to the longer version so that people can find that
more easily.
Cheers
view thread (12+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Window Function "Run Conditions"
In-Reply-To: <CALNJ-vTuJ_-P5SG=Lq+5nO8=A3ibbtNPSqgHyG2p6nS7sNdLYw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox