mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql parser. for issue #1789
This commit is contained in:
@@ -1382,6 +1382,15 @@ public class SQLExprParser extends SQLParser {
|
||||
SQLInListExpr inListExpr = new SQLInListExpr(expr);
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() == Token.WITH) {
|
||||
SQLSelect select = this.createSelectParser().select();
|
||||
SQLInSubQueryExpr queryExpr = new SQLInSubQueryExpr(select);
|
||||
queryExpr.setExpr(expr);
|
||||
accept(Token.RPAREN);
|
||||
return queryExpr;
|
||||
}
|
||||
|
||||
exprList(inListExpr.getTargetList(), inListExpr);
|
||||
accept(Token.RPAREN);
|
||||
expr = inListExpr;
|
||||
|
||||
Reference in New Issue
Block a user