improved oracle sql parser. issue #1400

This commit is contained in:
wenshao
2016-09-11 23:24:49 +08:00
parent d069606a9e
commit d66fcf737e
5 changed files with 123 additions and 58 deletions
@@ -1232,6 +1232,14 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
putAliasMap(this.aliasMap, x.getAlias(), tableName);
}
if (x.getTableSource() instanceof SQLSubqueryTableSource) {
SQLSelectQuery selectQuery = ((SQLSubqueryTableSource) x.getTableSource()).getSelect().getQuery();
if (selectQuery instanceof SQLSelectQueryBlock) {
SQLSelectQueryBlock subQueryBlock = ((SQLSelectQueryBlock) selectQuery);
subQueryBlock.getWhere().accept(this);
}
}
TableStat stat = getTableStat(tableName);
stat.incrementDeleteCount();