bug fixed for oracle sql parser. for issue #2417

This commit is contained in:
wenshao
2018-03-19 20:26:16 +08:00
parent 7e5ce59c6c
commit 22802228e1
2 changed files with 62 additions and 3 deletions
@@ -2946,9 +2946,13 @@ public class SQLExprParser extends SQLParser {
lexer.nextTokenComma();
if (hash_lower == FnvHash.Constants.CONNECT_BY_ROOT) {
connectByRoot = true;
expr = new SQLIdentifierExpr(lexer.stringVal());
lexer.nextToken();
connectByRoot = lexer.token != Token.LPAREN;
if (connectByRoot) {
expr = new SQLIdentifierExpr(lexer.stringVal());
lexer.nextToken();
} else {
expr = new SQLIdentifierExpr(ident);
}
} else if (FnvHash.Constants.DATE == hash_lower
&& lexer.token == Token.LITERAL_CHARS
&& (JdbcConstants.ORACLE.equals(getDbType())