bug fixed for SchemaStatVisitor.

This commit is contained in:
wenshao
2018-02-26 14:03:47 +08:00
parent 9d893f72f4
commit b439c0a0a9
4 changed files with 94 additions and 13 deletions
@@ -1693,6 +1693,17 @@ class SchemaResolveVisitorFactory {
}
if (table != null) {
if (from != null && table instanceof SQLExprTableSource) {
SQLExpr tableExpr = ((SQLExprTableSource) table).getExpr();
if (tableExpr instanceof SQLPropertyExpr
&& ((SQLPropertyExpr) tableExpr).getName().equals("*")) {
String alias = ((SQLPropertyExpr) tableExpr).getOwnernName();
SQLTableSource refTableSource = from.findTableSource(alias);
if (refTableSource != null) {
((SQLPropertyExpr) tableExpr).setResolvedTableSource(refTableSource);
}
}
}
table.accept(visitor);
ctx.setTableSource(table);
}