}
private SqlJoinBuilder subJoinAndFilter(SqlJoinBuilder query, FromItem from)
throws RdbmsException, UnsupportedRdbmsOperatorException {
if (from instanceof UnionItem) {
UnionItem union = (UnionItem) from;
List<String> names = union.getSelectVarNames();
List<ColumnVar> vars = union.appendVars(new ArrayList<ColumnVar>());
SqlQueryBuilder subquery = query.subquery();
for (FromItem item : union.getUnion()) {
for (int i = 0, n = names.size(); i < n; i++) {
ColumnVar var = item.getVar(names.get(i));
SqlExprBuilder select = subquery.select();
if (var == null) {
select.appendNull();