mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser. bug fixed for oracle extract function. issue #1481
This commit is contained in:
@@ -351,6 +351,7 @@ public class SQLExprParser extends SQLParser {
|
||||
case EXCEPTION:
|
||||
case FUNCTION:
|
||||
case IDENTITY:
|
||||
case EXTRACT:
|
||||
sqlExpr = new SQLIdentifierExpr(lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
break;
|
||||
@@ -801,6 +802,12 @@ public class SQLExprParser extends SQLParser {
|
||||
exprList(methodInvokeExpr.getParameters(), methodInvokeExpr);
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.FROM) {
|
||||
lexer.nextToken();
|
||||
SQLExpr from = this.expr();
|
||||
methodInvokeExpr.setFrom(from);
|
||||
}
|
||||
|
||||
accept(Token.RPAREN);
|
||||
|
||||
if (lexer.token() == Token.OVER) {
|
||||
|
||||
Reference in New Issue
Block a user