Wildcard c2 = new Wildcard(filter.getTable().getSchema().getName(), filter.getTableAlias());
expressions.add(i++, c2);
}
i = temp - 1;
} else {
TableFilter filter = null;
for (TableFilter f : filters) {
if (db.equalsIdentifiers(tableAlias, f.getTableAlias())) {
if (schemaName == null || db.equalsIdentifiers(schemaName, f.getSchemaName())) {
filter = f;
break;
}
}
}
if (filter == null) {
throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1, tableAlias);
}
Table t = filter.getTable();
String alias = filter.getTableAlias();
expressions.remove(i);
Column[] columns = t.getColumns();
for (Column c : columns) {
if (filter.isNaturalJoinColumn(c)) {
continue;
}
ExpressionColumn ec = new ExpressionColumn(session.getDatabase(), null, alias, c.getColumnFamilyName(),
c.getName());
expressions.add(i++, ec);