|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.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,
OuterJoinDesc[] outerJoinDescList,
java.lang.String[] streamNames,
EventType[] typesPerStream,
HistoricalViewableDesc historicalViewableDesc,
DependencyGraph dependencyGraph,
HistoricalStreamIndexList[] historicalStreamIndexLists,
ExprEvaluatorContext exprEvaluatorContext,
java.lang.String[][][] indexedStreamsUniqueProps,
TableMetadata[] tablesPerStream)
Build a query plan based on the stream property relationships indicated in queryGraph. |
protected static OuterInnerDirectionalGraph |
graphOuterJoins(int numStreams,
OuterJoinDesc[] outerJoinDescList)
Builds a graph of outer joins given the outer join information from the statement. |
static java.lang.String |
print(java.util.Map<java.lang.Integer,int[]> streamsJoinedPerStream)
Returns textual presentation of stream-substream relationships. |
protected static void |
recursiveBuild(int streamNum,
java.util.Stack<java.lang.Integer> streamCallStack,
QueryGraph queryGraph,
OuterInnerDirectionalGraph outerInnerGraph,
InnerJoinGraph innerJoinGraph,
java.util.Set<java.lang.Integer> completedStreams,
java.util.LinkedHashMap<java.lang.Integer,int[]> substreamsPerStream,
boolean[] requiredPerStream,
DependencyGraph dependencyGraph)
Recusivly builds a substream-per-stream ordered tree graph using the join information supplied for outer joins and from the query graph (where clause). |
protected static void |
recursiveBuildInnerJoin(int streamNum,
java.util.Stack<java.lang.Integer> streamCallStack,
QueryGraph queryGraph,
java.util.Set<java.lang.Integer> completedStreams,
java.util.LinkedHashMap<java.lang.Integer,int[]> substreamsPerStream,
DependencyGraph dependencyGraph)
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,
java.util.Map<java.lang.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, OuterJoinDesc[] outerJoinDescList, java.lang.String[] streamNames, EventType[] typesPerStream, HistoricalViewableDesc historicalViewableDesc, DependencyGraph dependencyGraph, HistoricalStreamIndexList[] historicalStreamIndexLists, ExprEvaluatorContext exprEvaluatorContext, java.lang.String[][][] indexedStreamsUniqueProps, TableMetadata[] tablesPerStream) throws ExprValidationException
queryGraph
- - navigation info between streamsstreamNames
- - stream namesouterJoinDescList
- - descriptors for all outer joinstypesPerStream
- - event types for each streamdependencyGraph
- - dependencies between historical streamshistoricalStreamIndexLists
- - index management, populated for the query planexprEvaluatorContext
- context for expression evalauation
ExprValidationException
- if the query planning failedprotected static void recursiveBuild(int streamNum, java.util.Stack<java.lang.Integer> streamCallStack, QueryGraph queryGraph, OuterInnerDirectionalGraph outerInnerGraph, InnerJoinGraph innerJoinGraph, java.util.Set<java.lang.Integer> completedStreams, java.util.LinkedHashMap<java.lang.Integer,int[]> substreamsPerStream, boolean[] requiredPerStream, DependencyGraph dependencyGraph) throws ExprValidationException
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 optionalstreamCallStack
- the query plan call stack of streams available via cursordependencyGraph
- - dependencies between historical streams
ExprValidationException
- if the query planning failedprotected static void recursiveBuildInnerJoin(int streamNum, java.util.Stack<java.lang.Integer> streamCallStack, QueryGraph queryGraph, java.util.Set<java.lang.Integer> completedStreams, java.util.LinkedHashMap<java.lang.Integer,int[]> substreamsPerStream, DependencyGraph dependencyGraph) throws ExprValidationException
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 infocompletedStreams
- is a temporary holder for streams already consideredsubstreamsPerStream
- is the ordered, tree-like structure to be filledstreamCallStack
- the query plan call stack of streams available via cursordependencyGraph
- - dependencies between historical streams
ExprValidationException
- if the query planning failedprotected static OuterInnerDirectionalGraph graphOuterJoins(int numStreams, OuterJoinDesc[] outerJoinDescList)
numStreams
- - is the number of streamsouterJoinDescList
- - list of outer join stream numbers and property names
public static void verifyJoinedPerStream(int rootStream, java.util.Map<java.lang.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 java.lang.String print(java.util.Map<java.lang.Integer,int[]> streamsJoinedPerStream)
streamsJoinedPerStream
- is the tree-like structure of stream-substream
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |