Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()

2023-01-26 Thread David Rowley
On Wed, 25 Jan 2023 at 02:39, Melanie Plageman wrote: > > On Tue, Jan 24, 2023 at 02:00:33PM +1300, David Rowley wrote: > > If you feel strongly about that, then feel free to show me what you > > have in mind in more detail so I can think harder about it. > > Nah, I don't feel strongly. I think it

Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()

2023-01-24 Thread Melanie Plageman
On Tue, Jan 24, 2023 at 02:00:33PM +1300, David Rowley wrote: > Thanks for having a look at this. > > On Tue, 24 Jan 2023 at 13:26, Melanie Plageman > wrote: > > > Since all three cases are exactly the same code, maybe you could > > macro-ize it and add a single comment? > > Hmm, I kinda like t

Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()

2023-01-23 Thread David Rowley
Thanks for having a look at this. On Tue, 24 Jan 2023 at 13:26, Melanie Plageman wrote: > Silly question, but was there any reason these were omitted in the first > commit? Good question, it's just that I didn't think of it at the time and nobody else did or if they did, they didn't mention it.

Re: Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()

2023-01-23 Thread Melanie Plageman
On Tue, Jan 24, 2023 at 11:01:08AM +1300, David Rowley wrote: > 9d9c02ccd [1] added infrastructure in the query planner and executor > so that the executor would know to stop processing a monotonic > WindowFunc when its value went beyond what some qual in the outer > query could possibly match in f

Monotonic WindowFunc support for ntile(), percent_rank() and cume_dist()

2023-01-23 Thread David Rowley
9d9c02ccd [1] added infrastructure in the query planner and executor so that the executor would know to stop processing a monotonic WindowFunc when its value went beyond what some qual in the outer query could possibly match in future evaluations due to the WindowFunc's monotonic nature. In that c