iffyio commented on code in PR #1867: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1867#discussion_r2118991085
########## src/parser/mod.rs: ########## @@ -10045,7 +10055,7 @@ impl<'a> Parser<'a> { } if self.parse_keywords(&[Keyword::GROUPING, Keyword::SETS]) { self.expect_token(&Token::LParen)?; - let result = self.parse_comma_separated(|p| p.parse_tuple(true, true))?; + let result = self.parse_comma_separated(|p| p.parse_grouping_set_element())?; Review Comment: could we inline the logic vs declaring it as a function? since the logic is only used once and small enough, ```rust let result = self.parse_comma_separated(|p| { if self.peek_token_ref().token == Token::LParen { self.parse_tuple(true, true) } else { Ok(vec![self.parse_expr()?]) } })?; ``` -- 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