public Holder<IndexColumnInfo> nextImpl() {
while(true) {
Holder<IndexColumnInfo> nextFromLeftCursor = leftResults.nextImpl();
if(nextFromLeftCursor == null)
break;
IndexColumnInfo leftResult = nextFromLeftCursor.getValue();
ByteArray pk = leftResult.getPrimaryKey(leftView);
pksToAlreadyFound.put(pk, leftResult);
return new Holder<IndexColumnInfo>(leftResult);
}
//NOW, as we go through the results on the right side, make sure we filter out
//duplicate primary keys by checking ones that we already returned.
while(true) {
Holder<IndexColumnInfo> fromRightCursor = rightResults.nextImpl();
if(fromRightCursor == null)
break;
IndexColumnInfo rightResult = fromRightCursor.getValue();
IndexColumnInfo found = pksToAlreadyFound.get(rightResult.getPrimaryKey(rightView));
if(found != null) {
found.mergeResults(rightResult);
} else {
return new Holder<IndexColumnInfo>(rightResult);
}
}