diff --git a/src/ast/query.rs b/src/ast/query.rs index 9a25358c5..bc32bf407 100644 --- a/src/ast/query.rs +++ b/src/ast/query.rs @@ -259,7 +259,7 @@ impl fmt::Display for Select { GroupByExpr::All => write!(f, " GROUP BY ALL")?, GroupByExpr::Expressions(exprs) => { if !exprs.is_empty() { - write!(f, " GROUP BY {}", display_comma_separated(&exprs))?; + write!(f, " GROUP BY {}", display_comma_separated(exprs))?; } } } diff --git a/tests/sqlparser_common.rs b/tests/sqlparser_common.rs index ddb25ae6d..806efe538 100644 --- a/tests/sqlparser_common.rs +++ b/tests/sqlparser_common.rs @@ -1824,7 +1824,7 @@ fn parse_select_group_by_all() { let sql = "SELECT id, fname, lname, SUM(order) FROM customer GROUP BY ALL"; let select = verified_only_select(sql); assert_eq!(GroupByExpr::All, select.group_by); - + one_statement_parses_to( "SELECT id, fname, lname, SUM(order) FROM customer GROUP BY ALL", "SELECT id, fname, lname, SUM(order) FROM customer GROUP BY ALL",