bug fixed for sql parser. for issue #2488

This commit is contained in:
wenshao
2018-05-27 16:38:55 +08:00
parent d4b2318663
commit 84541241f7
5 changed files with 266 additions and 2 deletions
@@ -1492,7 +1492,7 @@ public class SQLExprParser extends SQLParser {
}
SQLOver.WindowingType windowingType = null;
if (lexer.identifierEquals(FnvHash.Constants.ROWS)) {
if (lexer.identifierEquals(FnvHash.Constants.ROWS) || lexer.token == Token.ROWS) {
windowingType = SQLOver.WindowingType.ROWS;
} else if (lexer.identifierEquals(FnvHash.Constants.RANGE)) {
@@ -1519,7 +1519,7 @@ public class SQLExprParser extends SQLParser {
accept(Token.AND);
SQLExpr betweenEnd;
if (lexer.identifierEquals(FnvHash.Constants.CURRENT)) {
if (lexer.identifierEquals(FnvHash.Constants.CURRENT) || lexer.token == Token.CURRENT) {
lexer.nextToken();
if (lexer.identifierEquals(FnvHash.Constants.ROW)) {
lexer.nextToken();