|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.join.plan.NStreamOuterQueryPlanBuilder
public class NStreamOuterQueryPlanBuilder
Builds a query plan for 3 or more streams in a outer join.
Constructor Summary | |
---|---|
NStreamOuterQueryPlanBuilder()
|
Method Summary | |
---|---|
protected static QueryPlan |
build(QueryGraph queryGraph,
List<OuterJoinDesc> outerJoinDescList,
String[] streamNames)
Build a query plan based on the stream property relationships indicated in queryGraph. |
protected static OuterInnerDirectionalGraph |
graphOuterJoins(int numStreams,
List<OuterJoinDesc> outerJoinDescList)
Builds a graph of outer joins given the outer join information from the statement. |
static String |
print(Map<Integer,int[]> streamsJoinedPerStream)
Returns textual presentation of stream-substream relationships. |
protected static void |
recursiveBuild(int streamNum,
QueryGraph queryGraph,
OuterInnerDirectionalGraph outerInnerGraph,
Set<Integer> completedStreams,
LinkedHashMap<Integer,int[]> substreamsPerStream,
boolean[] requiredPerStream)
Recusivly builds a substream-per-stream ordered tree graph using the join information supplied for outer joins and from the query graph (where clause). |
static void |
verifyJoinedPerStream(int rootStream,
Map<Integer,int[]> streamsJoinedPerStream)
Verifies that the tree-like structure representing which streams join (lookup) into which sub-streams is correct, ie. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NStreamOuterQueryPlanBuilder()
Method Detail |
---|
protected static QueryPlan build(QueryGraph queryGraph, List<OuterJoinDesc> outerJoinDescList, String[] streamNames)
queryGraph
- - navigation info between streamsstreamNames
- - stream names or aliasesouterJoinDescList
- - descriptors for all outer joins
protected static void recursiveBuild(int streamNum, QueryGraph queryGraph, OuterInnerDirectionalGraph outerInnerGraph, Set<Integer> completedStreams, LinkedHashMap<Integer,int[]> substreamsPerStream, boolean[] requiredPerStream)
Required streams are considered first and their lookup is placed first in the list to gain performance.
streamNum
- is the root stream number that supplies the incoming event to build the tree forqueryGraph
- contains where-clause stream relationship infoouterInnerGraph
- contains the outer join stream relationship infocompletedStreams
- is a temporary holder for streams already consideredsubstreamsPerStream
- is the ordered, tree-like structure to be filledrequiredPerStream
- indicates which streams are required and which are optionalprotected static OuterInnerDirectionalGraph graphOuterJoins(int numStreams, List<OuterJoinDesc> outerJoinDescList)
numStreams
- - is the number of streamsouterJoinDescList
- - list of outer join stream numbers and property names
public static void verifyJoinedPerStream(int rootStream, Map<Integer,int[]> streamsJoinedPerStream)
rootStream
- is the stream supplying the incoming eventstreamsJoinedPerStream
- is keyed by the from-stream number and contains as values all
stream numbers of lookup into to-streams.public static String print(Map<Integer,int[]> streamsJoinedPerStream)
streamsJoinedPerStream
- is the tree-like structure of stream-substream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |