schemat stat condition support cast & current_date

This commit is contained in:
高铁
2020-12-12 23:26:19 +08:00
parent 4c94723280
commit c9a1c3fc1d
2 changed files with 40 additions and 1 deletions
@@ -840,7 +840,13 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
}
Object value;
if (item instanceof SQLMethodInvokeExpr) {
if (item instanceof SQLCastExpr) {
item = ((SQLCastExpr) item).getExpr();
}
if (item instanceof SQLMethodInvokeExpr
|| item instanceof SQLCurrentTimeExpr) {
value = item.toString();
} else {
value = SQLEvalVisitorUtils.eval(dbType, item, parameters, false);