mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-10 05:52:13 +00:00
feat: Group By All (#964)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
2593dcfb79
commit
bb7b05e106
9 changed files with 85 additions and 36 deletions
|
@ -5662,9 +5662,13 @@ impl<'a> Parser<'a> {
|
|||
};
|
||||
|
||||
let group_by = if self.parse_keywords(&[Keyword::GROUP, Keyword::BY]) {
|
||||
self.parse_comma_separated(Parser::parse_group_by_expr)?
|
||||
if self.parse_keyword(Keyword::ALL) {
|
||||
GroupByExpr::All
|
||||
} else {
|
||||
GroupByExpr::Expressions(self.parse_comma_separated(Parser::parse_group_by_expr)?)
|
||||
}
|
||||
} else {
|
||||
vec![]
|
||||
GroupByExpr::Expressions(vec![])
|
||||
};
|
||||
|
||||
let cluster_by = if self.parse_keywords(&[Keyword::CLUSTER, Keyword::BY]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue