// Convert from index column position to parameter number.
Column indexedColumn = crossReferencedColumns.get(i);
int fkpos = referencedColumns.indexOf(indexedColumn);
vars.add(new TPreparedParameter(fkpos, indexedColumn.getType()));
}
UnboundExpressions indexExprs = new RowBasedUnboundExpressions(indexRowType, vars);
IndexBound indexBound = new IndexBound(indexExprs, plan);
IndexKeyRange indexKeyRange = IndexKeyRange.bounded(indexRowType, indexBound, true, indexBound, true);
input = API.indexScan_Default(indexRowType, indexKeyRange, 1);
input = API.groupLookup_Default(input, group, indexRowType,
Collections.singletonList(tableRowType),