LucaCappelletti94 opened a new pull request, #2781: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2781
`SELECT sum(x) OVER (ORDER BY f RANGE BETWEEN 'inf' PRECEDING AND '1 day' FOLLOWING) FROM t` rendered with `INTERVAL 'inf' PRECEDING AND INTERVAL '1 day' FOLLOWING` in every dialect without `require_interval_qualifier`. PostgreSQL and SQLite take the type of an untyped offset from the `ORDER BY` column, so the added `INTERVAL` changes the statement. The frame offset is now parsed with `parse_expr`, dropping the string special case added in #655. `INTERVAL '1' DAY PRECEDING` still parses as an interval. In the dialects that require an interval qualifier, `'1' PRECEDING` used to fail and now parses as a string, and `'1' DAY PRECEDING` without `INTERVAL` now fails. https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS and https://www.sqlite.org/windowfunctions.html#frame_boundaries Yet another PR that has more PR text than code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
