iffyio commented on code in PR #1630: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1630#discussion_r1904299807
########## src/parser/mod.rs: ########## @@ -2353,14 +2355,30 @@ impl<'a> Parser<'a> { }; Ok(DateTimeField::Week(week_day)) } + Keyword::WEEKS => { + let week_day = if dialect_of!(self is BigQueryDialect) + && self.consume_token(&Token::LParen) + { + let week_day = self.parse_identifier()?; + self.expect_token(&Token::RParen)?; + Some(week_day) + } else { + None + }; + Ok(DateTimeField::Weeks(week_day)) + } Review Comment: @wugeer I think the code still references BigQuery, realized the tests don't seem to cover this scenario, but actually I'm also wondering which dialect supports these pluralized time units (do you have a link to the docs)? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org