|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.core.ResultSetProcessorAggregateGrouped
public class ResultSetProcessorAggregateGrouped
Result-set processor for the aggregate-grouped case: there is a group-by and one or more non-aggregation event properties in the select clause are not listed in the group by, and there are aggregation functions.
This processor does perform grouping by computing MultiKey group-by keys for each row. The processor generates one row for each event entering (new event) and one row for each event leaving (old event).
Aggregation state is a table of rows held by AggregationService
where the row key is the group-by MultiKey.
Constructor Summary | |
---|---|
ResultSetProcessorAggregateGrouped(SelectExprProcessor selectExprProcessor,
OrderByProcessor orderByProcessor,
AggregationService aggregationService,
List<ExprNode> groupKeyNodes,
ExprNode optionalHavingNode,
boolean isOutputLimiting,
boolean isOutputLimitLastOnly)
Ctor. |
Method Summary | |
---|---|
protected MultiKeyUntyped |
generateGroupKey(EventBean[] eventsPerStream,
boolean isNewData)
Generates the group-by key for the row |
Iterator<EventBean> |
getIterator(Viewable parent)
Returns the iterator implementing the group-by and aggregation and order-by logic specific to each case of use of these construct. |
ExprNode |
getOptionalHavingNode()
Returns the having node. |
EventType |
getResultEventType()
Returns the event type of processed results. |
SelectExprProcessor |
getSelectExprProcessor()
Returns the select expression processor |
Pair<EventBean[],EventBean[]> |
processJoinResult(Set<MultiKey<EventBean>> newEvents,
Set<MultiKey<EventBean>> oldEvents)
For use by joins posting their result, process the event rows that are entered and removed (new and old events). |
Pair<EventBean[],EventBean[]> |
processViewResult(EventBean[] newData,
EventBean[] oldData)
For use by views posting their result, process the event rows that are entered and removed (new and old events). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetProcessorAggregateGrouped(SelectExprProcessor selectExprProcessor, OrderByProcessor orderByProcessor, AggregationService aggregationService, List<ExprNode> groupKeyNodes, ExprNode optionalHavingNode, boolean isOutputLimiting, boolean isOutputLimitLastOnly)
selectExprProcessor
- - for processing the select expression and generting the final output rowsorderByProcessor
- - for sorting outgoing events according to the order-by clauseaggregationService
- - handles aggregationgroupKeyNodes
- - list of group-by expression nodes needed for building the group-by keysoptionalHavingNode
- - expression node representing validated HAVING clause, or null if none given.
Aggregation functions in the having node must have been pointed to the AggregationService for evaluation.isOutputLimiting
- - true to indicate that we limit outputisOutputLimitLastOnly
- - true to indicate that we limit output to the last eventMethod Detail |
---|
public EventType getResultEventType()
ResultSetProcessor
getResultEventType
in interface ResultSetProcessor
public Pair<EventBean[],EventBean[]> processJoinResult(Set<MultiKey<EventBean>> newEvents, Set<MultiKey<EventBean>> oldEvents)
ResultSetProcessor
processJoinResult
in interface ResultSetProcessor
newEvents
- - new events posted by joinoldEvents
- - old events posted by join
public Pair<EventBean[],EventBean[]> processViewResult(EventBean[] newData, EventBean[] oldData)
ResultSetProcessor
processViewResult
in interface ResultSetProcessor
newData
- - new events posted by viewoldData
- - old events posted by view
protected MultiKeyUntyped generateGroupKey(EventBean[] eventsPerStream, boolean isNewData)
eventsPerStream
- is the row of eventsisNewData
- is true for new data
public Iterator<EventBean> getIterator(Viewable parent)
ResultSetProcessor
getIterator
in interface ResultSetProcessor
parent
- is the parent view iterator
public SelectExprProcessor getSelectExprProcessor()
public ExprNode getOptionalHavingNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |