mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for db2 sql parser. for issue #2304
This commit is contained in:
@@ -107,6 +107,15 @@ public class DB2ExprParser extends SQLExprParser {
|
||||
expr = new SQLIdentifierExpr("CURRENT TIME");
|
||||
}
|
||||
}
|
||||
} else if (lexer.token() == Token.SCHEMA) {
|
||||
if (expr instanceof SQLIdentifierExpr) {
|
||||
SQLIdentifierExpr identExpr = (SQLIdentifierExpr) expr;
|
||||
if (identExpr.hashCode64() == FnvHash.Constants.CURRENT) {
|
||||
lexer.nextToken();
|
||||
|
||||
expr = new SQLIdentifierExpr("CURRENT SCHEMA");
|
||||
}
|
||||
}
|
||||
} else if (lexer.identifierEquals(FnvHash.Constants.MONTHS)) {
|
||||
SQLIntervalExpr intervalExpr = new SQLIntervalExpr(expr, SQLIntervalUnit.MONTH);
|
||||
lexer.nextToken();
|
||||
|
||||
Reference in New Issue
Block a user