Re: [PATCH] distinct aggregates within a window function WIP - Mailing list pgsql-hackers

From Krasiyan Andreev
Subject Re: [PATCH] distinct aggregates within a window function WIP
Date
Msg-id CAN1PwomQ8JxaTdWkVUSt4XK_irct__78f0YFiBCMT6HF91e0Jw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] distinct aggregates within a window function WIP  (Surafel Temesgen <surafel3000@gmail.com>)
Responses Re: [PATCH] distinct aggregates within a window function WIP  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Thank you very much.

I think that Vik Fearing's patch about "Implement <null treatment> for window functions" is much clear, better and has a chance to be committed.
For me it's not important which patch will go into PostgreSQL, because it's a much needed feature.

In mine patch, there is also a feature about using negative indexes, to be able to reverse order in exact same window frame for "FROM FIRST/FROM LAST",
but I am not sure, is such non-standard usage is acceptable (it's the same as some array functions in programming language), if it's acceptable, it can be easy ported to Vik's patch.

I am thinking also to concentrate on Vik's patch, if it has a clear design point of view, clear design, I can withdraw mine patch.



На ср, 16.09.2020 г. в 11:19 Surafel Temesgen <surafel3000@gmail.com> написа:

On Thu, Mar 5, 2020 at 4:17 AM Krasiyan Andreev <krasiyan@gmail.com> wrote:
I have currently suspended development of this patch, based on it's review,
but I will continue development of the other Oliver Ford's work about adding support of respect/ignore nulls
for lag(),lead(),first_value(),last_value() and nth_value() and from first/last for nth_value() patch,
but I am not sure how to proceed with it's implementation and any feedback will be very helpful.


* I applied your patch on top of 58c47ccfff20b8c125903 . It applied cleanly , compiled, make check pass, but it have white space errors:

*Added functions on windowfuncs.c have no comments so it's not easily understandable.

* Regression test addition seems huge to me. Can you reduce that? You can use existing tables and fewer records.

* I don’t understand why this patch has to change makeBoolAConst? It already make “bool” constant node


regards

Surafel
 

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: [Patch] Optimize dropping of relation buffers using dlist
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Yet another fast GiST build