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
demandé il y a 2 ans718 vues
1 réponse
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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions