Enable grouping sets parsing for GenericDialect (#771)

This commit is contained in:
Jeffrey 2022-12-29 00:31:39 +11:00 committed by GitHub
parent 79d0baad73
commit f0870fd315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -943,7 +943,7 @@ impl<'a> Parser<'a> {
/// parse a group by expr. a group by expr can be one of group sets, roll up, cube, or simple
/// expr.
fn parse_group_by_expr(&mut self) -> Result<Expr, ParserError> {
if dialect_of!(self is PostgreSqlDialect) {
if dialect_of!(self is PostgreSqlDialect | GenericDialect) {
if self.parse_keywords(&[Keyword::GROUPING, Keyword::SETS]) {
self.expect_token(&Token::LParen)?;
let result = self.parse_comma_separated(|p| p.parse_tuple(false, true))?;