MartinSahlen commented on code in PR #1657: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1657#discussion_r1917893541
########## src/parser/mod.rs: ########## @@ -7341,6 +7341,10 @@ impl<'a> Parser<'a> { pub fn parse_options(&mut self, keyword: Keyword) -> Result<Vec<SqlOption>, ParserError> { if self.parse_keyword(keyword) { self.expect_token(&Token::LParen)?; + if self.peek_token() == Token::RParen { + self.next_token(); + return Ok(vec![]); + } let options = self.parse_comma_separated(Parser::parse_sql_option)?; self.expect_token(&Token::RParen)?; Review Comment: I tried changing both `parse_options` and `parse_options_with_keywords` as they excibit similar behaviour but I cannot get the tests to pass, although my original use case is working. It could be that I've stumbled upon some deeper issue or bug though (or I dont know enough about the code base which is clearly the case). The question is whether this potential bug should be addressed in this PR or not. Based on the expected bevahour of the function you suggested this seems like a bug. -- 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