net.esper.eql.join.exec
Class NestedIterationExecNode

java.lang.Object
  extended by net.esper.eql.join.exec.ExecNode
      extended by net.esper.eql.join.exec.NestedIterationExecNode

public class NestedIterationExecNode
extends ExecNode

Execution node that performs a nested iteration over all child nodes.

Each child node under this node typically represents a table lookup. The implementation 'hops' from the first child to the next recursively for each row returned by a child.

It passes a 'prototype' row (prefillPath) to each new child which contains the current partial event set.


Constructor Summary
NestedIterationExecNode(int[] nestedStreams)
          Ctor.
 
Method Summary
 void addChildNode(ExecNode childNode)
          Add a child node.
 void print(IndentWriter writer)
          Output the execution strategy.
 void process(EventBean lookupEvent, EventBean[] prefillPath, java.util.List<EventBean[]> result)
          Process single event using the prefill events to compile lookup results.
protected  void recursiveNestedJoin(EventBean lookupEvent, int nestingOrderIndex, EventBean[] currentPath, java.util.List<EventBean[]> result)
          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.
 
Methods inherited from class net.esper.eql.join.exec.ExecNode
print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedIterationExecNode

public NestedIterationExecNode(int[] nestedStreams)
Ctor.

Parameters:
nestedStreams - - array of integers defining order of streams in nested join.
Method Detail

addChildNode

public void addChildNode(ExecNode childNode)
Add a child node.

Parameters:
childNode - to add

process

public void process(EventBean lookupEvent,
                    EventBean[] prefillPath,
                    java.util.List<EventBean[]> result)
Description copied from class: ExecNode
Process single event using the prefill events to compile lookup results.

Specified by:
process in class ExecNode
Parameters:
lookupEvent - - event to look up for or query for
prefillPath - - set of events currently in the example tuple to serve as a prototype for result rows.
result - is the list of tuples to add a result row to

recursiveNestedJoin

protected void recursiveNestedJoin(EventBean lookupEvent,
                                   int nestingOrderIndex,
                                   EventBean[] currentPath,
                                   java.util.List<EventBean[]> result)
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.

Parameters:
lookupEvent - - current event to use for lookup by child node
nestingOrderIndex - - index within the child nodes indicating what nesting level we are at
currentPath - - prototype result row to use by child nodes for generating result rows
result - - result tuple rows to be populated

print

public void print(IndentWriter writer)
Description copied from class: ExecNode
Output the execution strategy.

Specified by:
print in class ExecNode
Parameters:
writer - to output to