Re: Implement for window functions - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Implement for window functions
Date
Msg-id CALNJ-vQEVZ=yyfAPzgoFOLEXVNJVOt-Lj_nQT2fU9YTi45ZKqA@mail.gmail.com
Whole thread Raw
In response to Re: Implement for window functions  (Krasiyan Andreev <krasiyan@gmail.com>)
Responses Re: Implement for window functions  (David Fetter <david@fetter.org>)
Re: Implement for window functions  (Vik Fearing <vik@postgresfriends.org>)
List pgsql-hackers
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 WINDOW_SEEK_CURRENT, I wonder why step should be 0.

Similar question for the last else statement below in WinGetFuncArgInFrame():

+       else if (seektype == WINDOW_SEEK_TAIL)
+           step = -1;
+       else
+           step = 0;

Thanks

On Fri, Jan 1, 2021 at 12:59 PM Krasiyan Andreev <krasiyan@gmail.com> wrote:
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 <krasiyan@gmail.com> написа:
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 <david@fetter.org> написа:
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 <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-hackers by date:

Previous
From: Krasiyan Andreev
Date:
Subject: Re: Implement for window functions
Next
From: Justin Pryzby
Date:
Subject: Re: adding wait_start column to pg_locks