|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.expression.core.ExprNodeBase
com.espertech.esper.epl.expression.subquery.ExprSubselectNode
public abstract class ExprSubselectNode
Represents a subselect in an expression tree.
Nested Class Summary | |
---|---|
static class |
ExprSubselectNode.SubqueryAggregationType
|
Field Summary | |
---|---|
static ExprSubselectNode[] |
EMPTY_SUBSELECT_ARRAY
|
protected ExprEvaluator |
filterExpr
The validate filter expression. |
protected EventType |
rawEventType
The event type generated for wildcard selects. |
protected java.lang.String[] |
selectAsNames
|
protected ExprNode[] |
selectClause
The validated select clause. |
protected ExprEvaluator[] |
selectClauseEvaluator
|
protected java.lang.String |
statementName
|
protected AggregationService |
subselectAggregationService
|
protected int |
subselectNumber
|
Constructor Summary | |
---|---|
ExprSubselectNode(StatementSpecRaw statementSpec)
Ctor. |
Method Summary | |
---|---|
boolean |
equalsNode(ExprNode node)
Return true if a expression node semantically equals the current node, or false if not. |
abstract java.lang.Object |
evaluate(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
Evaluate the lookup expression returning an evaluation result object. |
java.lang.Object |
evaluate(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
Evaluate event tuple and return result. |
abstract java.util.Collection<EventBean> |
evaluateGetCollEvents(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
|
abstract java.util.Collection |
evaluateGetCollScalar(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
|
abstract EventBean |
evaluateGetEventBean(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
|
EventBean |
evaluateGetEventBean(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
java.util.Collection<EventBean> |
evaluateGetROCollectionEvents(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
|
java.util.Collection |
evaluateGetROCollectionScalar(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
|
abstract java.lang.Object[][] |
evaluateTypableMulti(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
|
java.lang.Object[][] |
evaluateTypableMulti(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
abstract java.lang.Object[] |
evaluateTypableSingle(EventBean[] eventsPerStream,
boolean isNewData,
java.util.Collection<EventBean> matchingEvents,
ExprEvaluatorContext exprEvaluatorContext)
|
java.lang.Object[] |
evaluateTypableSingle(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
ExprEvaluator |
getExprEvaluator()
|
ExprEvaluator |
getFilterExpr()
Returns filter expr or null if none. |
StreamTypeService |
getFilterSubqueryStreamTypes()
Return stream types. |
ExprPrecedenceEnum |
getPrecedence()
Returns precedence. |
EventType |
getRawEventType()
Returns the event type. |
java.util.LinkedHashMap<java.lang.String,java.lang.Object> |
getRowProperties()
Return null to indicate no row-type result available, or a map of property names and types to indicate a row-type result is available. |
ExprNode[] |
getSelectClause()
Returns the select clause or null if none. |
StatementSpecCompiled |
getStatementSpecCompiled()
Returns the compiled statement spec. |
StatementSpecRaw |
getStatementSpecRaw()
Returns the uncompiled statement spec. |
AggregationService |
getSubselectAggregationService()
|
ExprSubselectNode.SubqueryAggregationType |
getSubselectAggregationType()
|
int |
getSubselectNumber()
|
abstract boolean |
isAllowMultiColumnSelect()
|
boolean |
isConstantResult()
Returns true if the expression node's evaluation value doesn't depend on any events data, as must be determined at validation time, which is bottom-up and therefore reliably allows each node to determine constant value. |
boolean |
isFilterStreamSubselect()
|
java.lang.Boolean |
isMultirow()
Return true for multi-row return, return false for return of single row only |
void |
setFilterExpr(ExprEvaluator filterExpr)
Sets the validated filter expression, or null if there is none. |
void |
setFilterStreamSubselect(boolean filterStreamSubselect)
|
void |
setFilterSubqueryStreamTypes(StreamTypeService filterSubqueryStreamTypes)
Set stream types. |
void |
setRawEventType(EventType rawEventType)
Sets the event type generated for wildcard selects. |
void |
setSelectAsNames(java.lang.String[] selectAsNames)
Supplies the name of the select expression as-tag |
void |
setSelectClause(ExprNode[] selectClause)
Sets the validate select clause |
void |
setStatementSpecCompiled(StatementSpecCompiled statementSpecCompiled,
int subselectNumber)
Supplies a compiled statement spec. |
void |
setStrategy(ExprSubselectStrategy strategy)
Sets the strategy for boiling down the table of lookup events into a subset against which to run the filter. |
void |
setSubselectAggregationService(AggregationService subselectAggregationService)
|
void |
setSubselectAggregationType(ExprSubselectNode.SubqueryAggregationType subselectAggregationType)
|
static ExprSubselectNode[] |
toArray(java.util.List<ExprSubselectNode> subselectNodes)
|
void |
toPrecedenceFreeEPL(java.io.StringWriter writer)
|
abstract java.util.LinkedHashMap<java.lang.String,java.lang.Object> |
typableGetRowProperties()
|
ExprNode |
validate(ExprValidationContext validationContext)
|
abstract void |
validateSubquery(ExprValidationContext validationContext)
|
Methods inherited from class com.espertech.esper.epl.expression.core.ExprNodeBase |
---|
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.espertech.esper.epl.expression.core.ExprEvaluatorEnumeration |
---|
getComponentTypeCollection, getEventTypeCollection, getEventTypeSingle |
Methods inherited from interface com.espertech.esper.epl.expression.core.ExprEvaluator |
---|
getType |
Field Detail |
---|
public static final ExprSubselectNode[] EMPTY_SUBSELECT_ARRAY
protected ExprNode[] selectClause
protected transient ExprEvaluator[] selectClauseEvaluator
protected java.lang.String[] selectAsNames
protected transient ExprEvaluator filterExpr
protected transient EventType rawEventType
protected java.lang.String statementName
protected int subselectNumber
protected transient AggregationService subselectAggregationService
Constructor Detail |
---|
public ExprSubselectNode(StatementSpecRaw statementSpec)
statementSpec
- is the lookup statement spec from the parser, unvalidatedMethod Detail |
---|
public abstract java.lang.Object evaluate(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
eventsPerStream
- is the events for each stream in a joinisNewData
- is true for new data, or false for old datamatchingEvents
- is filtered results from the table of stored lookup eventsexprEvaluatorContext
- context for expression evalauation
public abstract java.util.Collection<EventBean> evaluateGetCollEvents(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
public abstract java.util.Collection evaluateGetCollScalar(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
public abstract EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
public abstract boolean isAllowMultiColumnSelect()
public abstract void validateSubquery(ExprValidationContext validationContext) throws ExprValidationException
ExprValidationException
public abstract java.util.LinkedHashMap<java.lang.String,java.lang.Object> typableGetRowProperties() throws ExprValidationException
ExprValidationException
public abstract java.lang.Object[] evaluateTypableSingle(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
public abstract java.lang.Object[][] evaluateTypableMulti(EventBean[] eventsPerStream, boolean isNewData, java.util.Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext)
public ExprEvaluator getExprEvaluator()
getExprEvaluator
in interface ExprNode
public boolean isConstantResult()
ExprNode
isConstantResult
in interface ExprNode
public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public void setStatementSpecCompiled(StatementSpecCompiled statementSpecCompiled, int subselectNumber)
statementSpecCompiled
- compiled validated filterspublic StatementSpecCompiled getStatementSpecCompiled()
public void setSelectClause(ExprNode[] selectClause)
selectClause
- is the expression representing the select clausepublic java.lang.Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
ExprEvaluator
evaluate
in interface ExprEvaluator
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)exprEvaluatorContext
- context for expression evaluation
public java.util.Collection<EventBean> evaluateGetROCollectionEvents(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
evaluateGetROCollectionEvents
in interface ExprEvaluatorEnumeration
public java.util.Collection evaluateGetROCollectionScalar(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
evaluateGetROCollectionScalar
in interface ExprEvaluatorEnumeration
public EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateGetEventBean
in interface ExprEvaluatorEnumeration
public java.util.LinkedHashMap<java.lang.String,java.lang.Object> getRowProperties() throws ExprValidationException
ExprEvaluatorTypableReturn
getRowProperties
in interface ExprEvaluatorTypableReturn
ExprValidationException
- if the expression is invalidpublic java.lang.Boolean isMultirow()
ExprEvaluatorTypableReturn
isMultirow
in interface ExprEvaluatorTypableReturn
public java.lang.Object[] evaluateTypableSingle(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateTypableSingle
in interface ExprEvaluatorTypableReturn
public java.lang.Object[][] evaluateTypableMulti(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateTypableMulti
in interface ExprEvaluatorTypableReturn
public StatementSpecRaw getStatementSpecRaw()
public void setSelectAsNames(java.lang.String[] selectAsNames)
selectAsNames
- is the as-name(s)public void setFilterExpr(ExprEvaluator filterExpr)
filterExpr
- is the filterpublic void toPrecedenceFreeEPL(java.io.StringWriter writer)
toPrecedenceFreeEPL
in class ExprNodeBase
public ExprPrecedenceEnum getPrecedence()
ExprNode
getPrecedence
in interface ExprNode
public boolean equalsNode(ExprNode node)
ExprNode
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
equalsNode
in interface ExprNode
node
- to compare to
public void setStrategy(ExprSubselectStrategy strategy)
strategy
- is the looking strategy (full table scan or indexed)public void setRawEventType(EventType rawEventType)
rawEventType
- is the wildcard type (parent view)public ExprNode[] getSelectClause()
public ExprEvaluator getFilterExpr()
public EventType getRawEventType()
public StreamTypeService getFilterSubqueryStreamTypes()
public void setFilterSubqueryStreamTypes(StreamTypeService filterSubqueryStreamTypes)
filterSubqueryStreamTypes
- typespublic ExprSubselectNode.SubqueryAggregationType getSubselectAggregationType()
public void setSubselectAggregationType(ExprSubselectNode.SubqueryAggregationType subselectAggregationType)
public int getSubselectNumber()
public void setFilterStreamSubselect(boolean filterStreamSubselect)
public boolean isFilterStreamSubselect()
public static ExprSubselectNode[] toArray(java.util.List<ExprSubselectNode> subselectNodes)
public void setSubselectAggregationService(AggregationService subselectAggregationService)
public AggregationService getSubselectAggregationService()
|
© 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 |