sabir-akhadov-localstack commented on code in PR #2781:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2781#discussion_r4586532290
##########
src/parser/mod.rs:
##########
@@ -2839,10 +2839,7 @@ impl<'a> Parser<'a> {
let rows = if self.parse_keyword(Keyword::UNBOUNDED) {
None
} else {
- Some(Box::new(match &self.peek_token_ref().token {
- Token::SingleQuotedString(_) => self.parse_interval()?,
- _ => self.parse_expr()?,
- }))
+ Some(Box::new(self.parse_expr()?))
Review Comment:
This also rejects `RANGE '1' DAY PRECEDING` (unit, no `INTERVAL` keyword) in
every dialect, Generic included: `Expected: PRECEDING or FOLLOWING, found:
DAY`. DataFusion's `window.slt` uses `'0' DAY FOLLOWING` and `'5' SECOND
PRECEDING`, and its planner only handles `Expr::Interval` or a number as a
frame offset, so maybe keep the interval path when the string is followed by a
temporal unit?
--
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]