mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql parser
This commit is contained in:
@@ -1176,7 +1176,9 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
charType.getArguments().add(this.expr());
|
||||
SQLExpr arg = this.expr();
|
||||
arg.setParent(charType);
|
||||
charType.getArguments().add(arg);
|
||||
accept(Token.RPAREN);
|
||||
}
|
||||
|
||||
@@ -1195,7 +1197,7 @@ public class SQLExprParser extends SQLParser {
|
||||
protected SQLDataType parseDataTypeRest(SQLDataType dataType) {
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
exprList(dataType.getArguments());
|
||||
exprList(dataType.getArguments(), dataType);
|
||||
accept(Token.RPAREN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user