add sql parser testcases

This commit is contained in:
高铁
2016-03-12 18:27:28 +08:00
parent 22fc05d39e
commit ae38d8e436
10 changed files with 335 additions and 27 deletions
@@ -288,9 +288,14 @@ public class SQLSelectParser extends SQLParser {
if (lexer.token() == Token.WITH) {
lexer.nextToken();
acceptIdentifier("ROLLUP");
groupBy.setWithRollUp(true);
if (identifierEquals("CUBE")) {
lexer.nextToken();
groupBy.setWithCube(true);
} else {
acceptIdentifier("ROLLUP");
groupBy.setWithRollUp(true);
}
}
queryBlock.setGroupBy(groupBy);