for (Column column : table.getColumns()) {
ColumnBinding prev = bindings.put(column.getName(),
new ColumnBinding(fromTable, column,
tableBinding.isNullable()));
if (prev != null)
throw new StandardException("Duplicate column name " + column.getName() + " not allowed with NATURAL JOIN");
}
}
else if (fromTable instanceof FromSubquery) {
FromSubquery fromSubquery = (FromSubquery)fromTable;
for (ResultColumn resultColumn : fromSubquery.getResultColumns()) {
ColumnBinding prev = bindings.put(resultColumn.getName(),
new ColumnBinding(fromTable, resultColumn));
if (prev != null)
throw new StandardException("Duplicate column name " + resultColumn.getName() + " not allowed with NATURAL JOIN");
}
}
else if (fromTable instanceof JoinNode) {
JoinNode joinNode = (JoinNode)fromTable;
getUniqueColumnBindings((FromTable)joinNode.getLeftResultSet(), bindings);