Hi hackers,
I want to continue development of Oliver Ford's 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 and any feedback will be very useful.
I have dropped support of from first/last for nth_value(), but also I reimplemented it in a different way,
by using negative number for the position argument, to be able to get the same frame in exact reverse order.
After that patch becomes much more simple and major concerns about precedence hack has gone,
but maybe it can be additionally simplified.
I have not renamed special bool type "ignorenulls", because it is probably not acceptable way for calling extra version
of window functions (because it makes things very easy, and it can reuse frames), but I removed the other special bool type "fromlast".
So, that is the major question, can someone give me an better idea or example that I can use,
for something, that can be more acceptable as implementation and I will try to do it in a such way.
Attached file is for PostgreSQL 13 (master git branch) and I will add it now to a March commit fest, to be able to track changes.
Everything works and patch is in very good shape, make check is passed and also, I use it from some time for SQL analysis purposes
(because ignore nulls is one of the most needed feature in OLAP/BI area and Oracle, Amazon Redshift and Informix have it).
After patch review and suggestions about what to do with special bool type and unreserved keywords, I will reimplement it, if needed.