MSCEWI3086
Window frame output may not be equivalent
Low
This warning is added when a ROWS window frame unit is found within the source code.
ROWS works by using physical row numbers for its computing, which it may differ once it is migrated to the target platform. Manually adding extra ORDER BY clauses can help mitigate or remove this issue.
SELECT
SUM(C_BIRTH_DAY)
OVER (
ORDER BY C_BIRTH_COUNTRY
ROWS UNBOUNDED PRECEDING) AS MAX1
FROM WINDOW_TABLE;
SELECT
SUM(C_BIRTH_DAY)
OVER (
ORDER BY C_BIRTH_COUNTRY ROWS /*** MSC-WARNING - MSCEWI3086 - WINDOW FRAME OUTPUT MAY NOT BE EQUIVALENT ***/ UNBOUNDED PRECEDING) AS MAX1
FROM PUBLIC.WINDOW_TABLE;
- Ensure deterministic ordering for rows to ensure deterministic outputs when running in Snowflake.
Last modified 3mo ago