mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -284,6 +284,11 @@ public class SQLSelectParser extends SQLParser {
|
||||
accept(Token.LPAREN);
|
||||
groupBy.setWithRollUp(true);
|
||||
}
|
||||
if (identifierEquals("CUBE")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.LPAREN);
|
||||
groupBy.setWithCube(true);
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
SQLExpr item = parseGroupByItem();
|
||||
@@ -297,7 +302,7 @@ public class SQLSelectParser extends SQLParser {
|
||||
|
||||
lexer.nextToken();
|
||||
}
|
||||
if (groupBy.isWithRollUp()) {
|
||||
if (groupBy.isWithRollUp() || groupBy.isWithCube()) {
|
||||
accept(Token.RPAREN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user