SimpleColumn replacedBy = r1.relation().columns().get(index1 - 1);
for (ColumnNamesImpl cibn : relationsFound.values()) {
// TODO improve time complexity
cibn.replace(replacedColumn, replacedBy);
}
named.replace(replacedColumn, replacedBy);
}
}
if (checkContainsSubquery(p)) {
throw new RuntimeException("not implemented (EXISTS in JOIN condition)");