Redshift Accepts IGNORE NULLS outside of expression

0

We've noticed placing INGORE NULLS inside and outside the expressions for FIRST_VALUE and LAST_VALUE yields the same semantic result. According to the docs it should be inside the expression. Is this expected behaviour or should Redshift only accept IGNORE NULLS inside the expression.

SELECT LAST_VALUE(venuename) IGNORE NULLS
    OVER (
        PARTITION BY venuestate
        ORDER BY venueseats
        ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
    ) AS last_val
FROM venue

yields same result as

SELECT LAST_VALUE(venuename IGNORE NULLS)
    OVER (
        PARTITION BY venuestate
        ORDER BY venueseats
        ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
    ) AS last_val
FROM venue
已提問 2 年前檢視次數 712 次
1 個回答
0

Indeed as per documentation it should be placed inside but since it is working either-ways then it would be really nice if you can use the Provide feedback link on the bottom of documentation page and help us make it better.

profile pictureAWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南