File tree 4 files changed +17
-5
lines changed
4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ pub enum NodeType {
67
67
ForSystemTimeAsOfClause , // FOR SYSTEM_TIME AS OF ts
68
68
ForStatement ,
69
69
GrantStatement ,
70
+ GroupByExprs ,
70
71
GroupedIdentWithOptions , // (col OPTIONS())
71
72
GroupedExpr , // (1)
72
73
GroupedExprs , // (1, 2, 3)
Original file line number Diff line number Diff line change @@ -1668,7 +1668,7 @@ impl Parser {
1668
1668
// GROUP BY
1669
1669
if self . get_token ( 1 ) ?. is ( "GROUP" ) {
1670
1670
self . next_token ( ) ?; // expr -> GROUP
1671
- let mut groupby = self . construct_node ( NodeType :: XXXByExprs ) ?;
1671
+ let mut groupby = self . construct_node ( NodeType :: GroupByExprs ) ?;
1672
1672
self . next_token ( ) ?; // GROUP -> BY
1673
1673
groupby. push_node ( "by" , self . construct_node ( NodeType :: Keyword ) ?) ;
1674
1674
if self . get_token ( 1 ) ?. in_ ( & vec ! [ "ROLLUP" , "CUBE" ] ) {
Original file line number Diff line number Diff line change @@ -2051,7 +2051,7 @@ from:
2051
2051
expr:
2052
2052
self: t (Identifier)
2053
2053
groupby:
2054
- self: GROUP (XXXByExprs )
2054
+ self: GROUP (GroupByExprs )
2055
2055
by:
2056
2056
self: BY (Keyword)
2057
2057
exprs:
@@ -2084,7 +2084,7 @@ from:
2084
2084
expr:
2085
2085
self: t (Identifier)
2086
2086
groupby:
2087
- self: GROUP (XXXByExprs )
2087
+ self: GROUP (GroupByExprs )
2088
2088
by:
2089
2089
self: BY (Keyword)
2090
2090
exprs:
@@ -2118,7 +2118,7 @@ from:
2118
2118
expr:
2119
2119
self: t (Identifier)
2120
2120
groupby:
2121
- self: GROUP (XXXByExprs )
2121
+ self: GROUP (GroupByExprs )
2122
2122
by:
2123
2123
self: BY (Keyword)
2124
2124
exprs:
@@ -2167,7 +2167,7 @@ from:
2167
2167
expr:
2168
2168
self: t (Identifier)
2169
2169
groupby:
2170
- self: GROUP (XXXByExprs )
2170
+ self: GROUP (GroupByExprs )
2171
2171
by:
2172
2172
self: BY (Keyword)
2173
2173
exprs:
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ export type UnknownNode =
59
59
| ForStatement
60
60
| ForSystemTimeAsOfClause
61
61
| GrantStatement
62
+ | GroupByExprs
62
63
| GroupedExpr
63
64
| GroupedExprs
64
65
| GroupedIdentWithOptions
@@ -810,6 +811,16 @@ export type GrantStatement = XXXStatement & {
810
811
};
811
812
};
812
813
814
+ export type GroupByExprs = BaseNode & {
815
+ token: Token;
816
+ node_type: "GroupByExprs";
817
+ children: {
818
+ by: NodeChild;
819
+ how?: NodeVecChild;
820
+ exprs: { NodeVec: Expr[] & UnknownNode[] };
821
+ };
822
+ };
823
+
813
824
export type GroupedExpr = FromItemExpr & {
814
825
node_type: "GroupedExpr";
815
826
children: {
You can’t perform that action at this time.
0 commit comments