protected void recursiveNestedJoin(EventBean lookupEvent,int nestingOrderIndex,EventBean[] currentPath,Collection<EventBean[]> result,ExprEvaluatorContext exprEvaluatorContext){
  List<EventBean[]> nestedResult=new LinkedList<EventBean[]>();
  ExecNode nestedExecNode=childNodes.get(nestingOrderIndex);
  nestedExecNode.process(lookupEvent,currentPath,nestedResult,exprEvaluatorContext);
  boolean isLastStream=(nestingOrderIndex == nestingOrderLength - 1);
  if (!isLastStream) {
    for (    EventBean[] row : nestedResult) {
      EventBean lookup=row[nestedStreams[nestingOrderIndex]];
      recursiveNestedJoin(lookup,nestingOrderIndex + 1,row,result,exprEvaluatorContext);
    }
    return;
  }
  for (  EventBean[] row : nestedResult) {
    result.add(row);
  }
}

protected void recursiveNestedJoin ( EventBean lookupEvent , int nestingOrderIndex , EventBean [ ] currentPath , Collection < EventBean [ ] > result , ExprEvaluatorContext exprEvaluatorContext ) { List < EventBean [ ] > nestedResult = new LinkedList < EventBean [ ] > ( ) ; ExecNode nestedExecNode = childNodes . get ( nestingOrderIndex ) ; nestedExecNode . process ( lookupEvent , currentPath , nestedResult , exprEvaluatorContext ) ; boolean isLastStream = ( nestingOrderIndex == nestingOrderLength - 1 ) ; if ( ! isLastStream ) { for ( EventBean [ ] row : nestedResult ) { EventBean lookup = row [ nestedStreams [ nestingOrderIndex ] ] ; recursiveNestedJoin ( lookup , nestingOrderIndex + 1 , row , result , exprEvaluatorContext ) ; } return ; } for ( EventBean [ ] row : nestedResult ) { result . add ( row ) ; } }
recursive method to run through all child nodes and , for each result set tuple returned by a child node , execute the inner child of the child node until there are no inner child nodes .
