|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.core.ResultSetProcessorRowPerGroup
public class ResultSetProcessorRowPerGroup
Result set processor for the fully-grouped case: there is a group-by and all non-aggregation event properties in the select clause are listed in the group by, and there are aggregation functions.
Produces one row for each group that changed (and not one row per event). Computes MultiKey group-by keys for each event and uses a set of the group-by keys to generate the result rows, using the first (old or new, anyone) event for each distinct group-by key.
Constructor Summary | |
---|---|
ResultSetProcessorRowPerGroup(SelectExprProcessor selectExprProcessor,
OrderByProcessor orderByProcessor,
AggregationService aggregationService,
List<ExprNode> groupKeyNodes,
ExprNode optionalHavingNode,
boolean isSelectRStream)
Ctor. |
Method Summary | |
---|---|
void |
clear()
Clear out current state. |
protected MultiKeyUntyped |
generateGroupKey(EventBean[] eventsPerStream,
boolean isNewData)
Generates the group-by key for the row |
Iterator<EventBean> |
getIterator(Set<MultiKey<EventBean>> joinSet)
Returns the iterator for iterating over a join-result. |
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 optional having expression. |
EventType |
getResultEventType()
Returns the event type of processed results. |
SelectExprProcessor |
getSelectExprProcessor()
Returns the select expression processor |
UniformPair<EventBean[]> |
processJoinResult(Set<MultiKey<EventBean>> newEvents,
Set<MultiKey<EventBean>> oldEvents,
boolean isSynthesize)
For use by joins posting their result, process the event rows that are entered and removed (new and old events). |
UniformPair<EventBean[]> |
processOutputLimitedJoin(List<UniformPair<Set<MultiKey<EventBean>>>> joinEventsSet,
boolean generateSynthetic,
OutputLimitLimitType outputLimitLimitType)
Processes batched events in case of output-rate limiting. |
UniformPair<EventBean[]> |
processOutputLimitedView(List<UniformPair<EventBean[]>> viewEventsList,
boolean generateSynthetic,
OutputLimitLimitType outputLimitLimitType)
Processes batched events in case of output-rate limiting. |
UniformPair<EventBean[]> |
processViewResult(EventBean[] newData,
EventBean[] oldData,
boolean isSynthesize)
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 ResultSetProcessorRowPerGroup(SelectExprProcessor selectExprProcessor, OrderByProcessor orderByProcessor, AggregationService aggregationService, List<ExprNode> groupKeyNodes, ExprNode optionalHavingNode, boolean isSelectRStream)
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.isSelectRStream
- - true if remove stream events should be generatedMethod Detail |
---|
public EventType getResultEventType()
ResultSetProcessor
getResultEventType
in interface ResultSetProcessor
public UniformPair<EventBean[]> processJoinResult(Set<MultiKey<EventBean>> newEvents, Set<MultiKey<EventBean>> oldEvents, boolean isSynthesize)
ResultSetProcessor
processJoinResult
in interface ResultSetProcessor
newEvents
- - new events posted by joinoldEvents
- - old events posted by joinisSynthesize
- - set to true to indicate that synthetic events are required for an iterator result set
public UniformPair<EventBean[]> processViewResult(EventBean[] newData, EventBean[] oldData, boolean isSynthesize)
ResultSetProcessor
processViewResult
in interface ResultSetProcessor
newData
- - new events posted by viewoldData
- - old events posted by viewisSynthesize
- - set to true to indicate that synthetic events are required for an iterator result set
protected MultiKeyUntyped generateGroupKey(EventBean[] eventsPerStream, boolean isNewData)
eventsPerStream
- is the row of eventsisNewData
- is true for new data
public ExprNode getOptionalHavingNode()
public SelectExprProcessor getSelectExprProcessor()
public Iterator<EventBean> getIterator(Viewable parent)
ResultSetProcessor
getIterator
in interface ResultSetProcessor
parent
- is the parent view iterator
public Iterator<EventBean> getIterator(Set<MultiKey<EventBean>> joinSet)
ResultSetProcessor
getIterator
in interface ResultSetProcessor
joinSet
- is the join result set
public void clear()
ResultSetProcessor
clear
in interface ResultSetProcessor
public UniformPair<EventBean[]> processOutputLimitedJoin(List<UniformPair<Set<MultiKey<EventBean>>>> joinEventsSet, boolean generateSynthetic, OutputLimitLimitType outputLimitLimitType)
ResultSetProcessor
processOutputLimitedJoin
in interface ResultSetProcessor
joinEventsSet
- the join resultsgenerateSynthetic
- flag to indicate whether synthetic events must be generatedoutputLimitLimitType
- the type of output rate limiting
public UniformPair<EventBean[]> processOutputLimitedView(List<UniformPair<EventBean[]>> viewEventsList, boolean generateSynthetic, OutputLimitLimitType outputLimitLimitType)
ResultSetProcessor
processOutputLimitedView
in interface ResultSetProcessor
viewEventsList
- the view resultsgenerateSynthetic
- flag to indicate whether synthetic events must be generatedoutputLimitLimitType
- the type of output rate limiting
|
© 2007 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 |