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 年前720 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则