if (in != null) {
OrderedIntHashSet set = new OrderedIntHashSet();
in.addLeftColumnsForAllAny(rangeVar, set);
Index index = rangeVar.rangeTable.getIndexForColumns(session,
set, false);
int colCount = 0;
for (int j = 0; j < index.getColumnCount(); j++) {
if (set.contains(index.getColumns()[j])) {
colCount++;
}
}
RangeVariable newRangeVar =
new RangeVariable(in.getRightNode().getTable(), null,
null, null, compileContext);
newRangeVar.isGenerated = true;
RangeVariable[] newList =
new RangeVariable[rangeVariables.length + 1];
ArrayUtil.copyAdjustArray(rangeVariables, newList,
newRangeVar, i, 1);
rangeVariables = newList;
// make two columns as arg
Expression[] exprList = new Expression[index.getColumnCount()];
for (int j = 0; j < colCount; j++) {
int leftIndex = index.getColumns()[j];
int rightIndex = set.getIndex(leftIndex);
Expression e = new ExpressionLogical(rangeVar, leftIndex,
newRangeVar,
rightIndex);