} else {
skvItor = new NestedIterator<Item>(skvItor, skv.iterator());
}
}
JoinTable joinTable = _joinTable;
final ValueSequence vs = new ValueSequence(dynEnv);
while(skvItor.hasNext()) {
final Comparable searchKey;
if(searchKeyLen == 1) {
final Item fsv = skvItor.next();
searchKey = mapArgument(fsv, 0, dynEnv);
} else {
final Comparable[] searchKeys = new Comparable[searchKeyLen];
for(int i = 0; i < searchKeyLen; i++) {
Item fsv = skvItor.next();
searchKeys[i] = mapArgument(fsv, i, dynEnv);
}
searchKey = new JoinTable.Key(searchKeys, _opr);
}
final IFocus<Item> jsItor = joinTable.entrySequence(searchKey, dynEnv).iterator();
for(Item entry : jsItor) {
vs.addItem(entry);
}
jsItor.closeQuietly();
}
if(vs.isEmpty()) {
return ValueSequence.EMPTY_SEQUENCE;
}
return vs;
}