public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tatsuo Ishii <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Date: Wed, 22 Jan 2025 20:58:18 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGMVOdsmC47TTbmryHNH3wF7hhXioScCFLqRt95pjFbD4r=BPg@mail.gmail.com>
References: <CAGMVOduQXZfJ0unxt+V=X3YKbcACbuACdXBKKNibQBjqrD=fpA@mail.gmail.com>
<[email protected]>
<CAGMVOdsmC47TTbmryHNH3wF7hhXioScCFLqRt95pjFbD4r=BPg@mail.gmail.com>
> Attached version moves the setting of IGNORE_NULLS to the window
> function itself, with the functions that don't allow it erroring out.
> This is done with a new api: WinCheckAndInitializeNullTreatment.
>
> Custom functions that don't call this will simply not have the
> IGNORE_NULLS option set as this api initializes the option and the
> array. As per the previous discussion, it should have correct
> formatting and handle the Exclusion clauses correctly.
I played with the v4 patch. It seems lead() produces incorrect result:
test=# SELECT x,y,lead(y) IGNORE NULLS OVER (ORDER BY x) FROM (VALUES(1,NULL),(2,2),(3,NULL)) AS v(x,y);
x | y | lead
---+---+------
1 | | 2
2 | 2 | 2
3 | | 2
(3 rows)
I think correct result of "lead" column is 2, NULL, NULL.
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
view thread (10+ messages)
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], [email protected], [email protected]
Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
In-Reply-To: <[email protected]>
* 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