bug fixed for sql parser. for issue #1970

This commit is contained in:
wenshao
2017-09-14 11:07:47 +08:00
parent 98b3263363
commit ff9364cf12
3 changed files with 100 additions and 5 deletions
@@ -2206,10 +2206,14 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
setMode(x, Mode.Merge);
String ident = x.getInto().toString();
TableStat stat = getTableStat(ident);
stat.incrementMergeCount();
SQLTableSource into = x.getInto();
if (into instanceof SQLExprTableSource) {
String ident = ((SQLExprTableSource) into).getExpr().toString();
TableStat stat = getTableStat(ident);
stat.incrementMergeCount();
} else {
into.accept(this);
}
x.getOn().accept(this);