try {
if(noInnerPlanOnRightSide){
Tuple t = rightLoader.getNext();
if(t == null) { // no more data on right side
return new Result(POStatus.STATUS_EOP, null);
} else {
return new Result(POStatus.STATUS_OK, t);
}
} else {
Result res = rightPipelineLeaf.getNext(dummyTuple);
rightPipelineLeaf.detachInput();
switch(res.returnStatus){
case POStatus.STATUS_OK:
return res;
case POStatus.STATUS_EOP:
Tuple t = rightLoader.getNext();
if(t == null) { // no more data on right side
return new Result(POStatus.STATUS_EOP, null);
} else {
// run the tuple through the pipeline
rightPipelineRoot.attachInput(t);
return this.getNextRightInp();
}
default: // We don't deal with ERR/NULL. just pass them down
throwProcessingException(false, null);
}
}
} catch (IOException e) {
throwProcessingException(true, e);
}
// we should never get here!
return new Result(POStatus.STATUS_ERR, null);
}