public void visit(AllColumns allColumns) {
this.qualifiedItems = Collections.singletonList(allColumns);
}
public void visit(AllTableColumns allTableColumns) {
AllTableColumns qualified = new AllTableColumns();
Table qt = allTableColumns.getTable();
Table unaliasedTable = (Table) tableAliases.get(qt.getName());
if (unaliasedTable == null) {
// not an aliased table, qualify it
qt = TableQualifier.qualify(session, allTableColumns.getTable());
} else {
// AllTableColumns is refering to an aliased table in the FROM
// clause,
// replace its table by the original one to get rid of the alias
qt = unaliasedTable;
}
qualified.setTable(qt);
String tableName = qt.getSchemaName() + "." + qt.getName();
SeColumnDefinition[] cols;
try {
cols = session.describe(tableName);