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年前682ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ