Re: Implement for window functions

2021-03-18 Thread David Steele
On 3/18/21 12:03 PM, Vik Fearing wrote: On 3/18/21 4:12 PM, David Steele wrote: Hi Vik, On 1/11/21 5:00 PM, Tom Lane wrote: I started to look through this patch... I see you moved this patch to PG15. If you won't be working on the patch in this CF Correct. I won't be working on this

Re: Implement for window functions

2021-03-18 Thread Vik Fearing
On 3/18/21 4:12 PM, David Steele wrote: > Hi Vik, > > On 1/11/21 5:00 PM, Tom Lane wrote: >> I started to look through this patch... > > I see you moved this patch to PG15. If you won't be working on the patch > in this CF Correct. I won't be working on this again until I finish my review of

Re: Implement for window functions

2021-03-18 Thread David Steele
Hi Vik, On 1/11/21 5:00 PM, Tom Lane wrote: I started to look through this patch... I see you moved this patch to PG15. If you won't be working on the patch in this CF perhaps it would be better to close it as Returned with Feedback for now and reopen it when you have a new patch? I'll do

Re: Implement for window functions

2021-01-11 Thread Tom Lane
I started to look through this patch, and the first thing I'm wondering about is why bother with a new pg_proc column, ie why not just apply the behavior to any window function? The fact that the SQL committee restricts this syntax to a few window functions is just their usual design tic of

Re: Implement for window functions

2021-01-09 Thread Zhihong Yu
Hi, For WinGetFuncArgInFrame(): + if (winobj->null_treatment == NULL_TREATMENT_IGNORE) { ... + if (target > 0) + step = 1; + else if (target < 0) + step = -1; + else if (seektype == WINDOW_SEEK_HEAD) + step = 1; + else if (seektype ==

Re: Implement for window functions

2021-01-09 Thread Krasiyan Andreev
Hi, patch applies and compiles, all included and external tests and building of the docs pass. After the last run of the cfbot, there are no any building warnings. I am using last version in our testing environment with real data and I didn't find any bugs, so I'm marking this patch as ready for

Re: Implement for window functions

2021-01-09 Thread Krasiyan Andreev
Hi, the building warning below is fixed now, no other changes. Also, I can confirm that the corner case with offset=0 in lead and lag works correctly. gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute

Re: Implement for window functions

2021-01-07 Thread Vik Fearing
On 1/1/21 10:21 PM, Zhihong Yu wrote: > Krasiyan: > Happy New Year. > > For WinGetFuncArgInPartition(): > > + if (target > 0) > + step = 1; > + else if (target < 0) > + step = -1; > + else > + step = 0; > > When would the

Re: Implement for window functions

2021-01-03 Thread David Fetter
On Fri, Jan 01, 2021 at 01:21:10PM -0800, Zhihong Yu wrote: > Krasiyan: > Happy New Year. > > For WinGetFuncArgInPartition(): > > + if (target > 0) > + step = 1; > + else if (target < 0) > + step = -1; > + else > + step = 0;

Re: Implement for window functions

2021-01-01 Thread Zhihong Yu
Krasiyan: Happy New Year. For WinGetFuncArgInPartition(): + if (target > 0) + step = 1; + else if (target < 0) + step = -1; + else + step = 0; When would the last else statement execute ? Since the above code is for

Re: Implement for window functions

2021-01-01 Thread Krasiyan Andreev
Hi, it looks like cfbot.cputube.org didn't recognize and can't apply a patch, so I resend it now with a different format, no other changes. На ср, 30.12.2020 г. в 22:16 ч. Krasiyan Andreev написа: > It works - now it compiles clean and all checks are passed, thank you. I > will continue with

Re: Implement for window functions

2020-12-30 Thread Krasiyan Andreev
It works - now it compiles clean and all checks are passed, thank you. I will continue with more complex tests. На ср, 30.12.2020 г. в 21:50 ч. David Fetter написа: > On Wed, Dec 30, 2020 at 09:32:26PM +0200, Krasiyan Andreev wrote: > > Hi, after latest committed patches about multirange

Re: Implement for window functions

2020-12-30 Thread David Fetter
On Wed, Dec 30, 2020 at 09:32:26PM +0200, Krasiyan Andreev wrote: > Hi, after latest committed patches about multirange datatypes, I get a > compilation error, Oh, right. I'd been meaning to send a patch to fix that. Here it is. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235

Re: Implement for window functions

2020-12-30 Thread Krasiyan Andreev
Hi, after latest committed patches about multirange datatypes, I get a compilation error, when I try to apply a patch about respect/ignore null for window functions. Without it applied, it complies clean and all checks are passed. [krasiyan@localhost build]$

Re: Implement for window functions

2020-12-08 Thread Vik Fearing
On 11/21/20 10:07 AM, Krasiyan Andreev wrote: > Fixed patch attached, after new introduced conflicts. > Vik, can you add it to the next commitfest, to be able to test it. I have done this now. Thanks! -- Vik Fearing

Re: Implement for window functions

2020-11-21 Thread Krasiyan Andreev
Fixed patch attached, after new introduced conflicts. Vik, can you add it to the next commitfest, to be able to test it. Also, all tests from Oliver Ford's old patch also passed successfully. На пт, 13.11.2020 г. в 0:44 ч. Vik Fearing написа: > On 11/12/20 11:35 PM, Krasiyan Andreev wrote: > >

Re: Implement for window functions

2020-11-12 Thread Vik Fearing
On 11/12/20 11:35 PM, Krasiyan Andreev wrote: > Hi, it looks like Vik Fearing's patch does not apply anymore, because there > are many conflicts with recent changes, fixed patch attached. Thanks! I've been away from this list for a while and I have some catching up to do. -- Vik Fearing

Re: Implement for window functions

2020-11-12 Thread Krasiyan Andreev
Hi, it looks like Vik Fearing's patch does not apply anymore, because there are many conflicts with recent changes, fixed patch attached. I am interested in reviewing and testing it for the next commitfest, if it's design and implementation is found to be acceptable. Additionally, if it is also

Re: Implement for window functions

2020-09-30 Thread Michael Paquier
On Wed, Jul 01, 2020 at 02:27:45PM +0200, Daniel Gustafsson wrote: > This was with GCC in the Travis build, the Windows build passed and so does > clang locally for me. This was two months ago, so this patch has been marked as returned with feedback. Please feel free to resubmit once you have a

Re: Implement for window functions

2020-07-01 Thread Daniel Gustafsson
> On 30 Jun 2020, at 15:54, Vik Fearing wrote: > This feature adds RESPECT NULLS and IGNORE NULLS syntax to several > window functions, according to the SQL Standard. This fails compilation due to a compiler warning in WinGetFuncArgInPartition and WinGetFuncArgInFrame (same warning in both):

Re: Implement for window functions

2020-06-30 Thread Dagfinn Ilmari Mannsåker
Vik Fearing writes: > The second patch adds some new window functions in order to test that > the null treatment works correctly for cases that aren't covered by the > standard functions but that custom functions might want to use. It is > *not* intended to be committed; I am only submitting

Implement for window functions

2020-06-30 Thread Vik Fearing
] https://www.postgresql.org/message-id/CAGMVOdsbtRwE_4%2Bv8zjH1d9xfovDeQAGLkP_B6k69_VoFEgX-A%40mail.gmail.com -- Vik Fearing >From 9ea72a4fe144f8ffdccb4b53eb4ea97e24ce61f7 Mon Sep 17 00:00:00 2001 From: Vik Fearing Date: Sun, 31 May 2020 07:29:35 +0200 Subject: [PATCH 1/2] implement for win