|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.core.OrderByProcessorSimple
public class OrderByProcessorSimple
An order-by processor that sorts events according to the expressions in the order_by clause.
Constructor Summary | |
---|---|
OrderByProcessorSimple(List<OrderByItem> orderByList,
List<ExprNode> groupByNodes,
boolean needsGroupByKeys,
AggregationService aggregationService)
Ctor. |
Method Summary | |
---|---|
protected static int |
compareValues(Object valueOne,
Object valueTwo,
boolean descending)
Compares values for sorting. |
MultiKeyUntyped |
getSortKey(EventBean[] eventsPerStream,
boolean isNewData)
Returns the sort key for a given row. |
MultiKeyUntyped[] |
getSortKeyPerRow(EventBean[] generatingEvents,
boolean isNewData)
Returns the sort key for a each row where a row is a single event (no join, single stream). |
EventBean[] |
sort(EventBean[] outgoingEvents,
EventBean[][] generatingEvents,
boolean isNewData)
Sort the output events. |
EventBean[] |
sort(EventBean[] outgoingEvents,
EventBean[][] generatingEvents,
MultiKeyUntyped[] groupByKeys,
boolean isNewData)
Sort the output events, using the provided group-by keys for evaluating grouped aggregation functions, and avoiding the cost of recomputing the keys. |
EventBean[] |
sort(EventBean[] outgoingEvents,
MultiKeyUntyped[] orderKeys)
Sort a given array of outgoing events using the sort keys returning a sorted outgoing event array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrderByProcessorSimple(List<OrderByItem> orderByList, List<ExprNode> groupByNodes, boolean needsGroupByKeys, AggregationService aggregationService)
orderByList
- -
the nodes that generate the keys to sort events ongroupByNodes
- -
generate the keys for determining aggregation groupsneedsGroupByKeys
- -
indicates whether this processor needs to have individual
group by keys to evaluate the sort condition successfullyaggregationService
- -
used to evaluate aggregate functions in the group-by and
sort-by clausesMethod Detail |
---|
public MultiKeyUntyped getSortKey(EventBean[] eventsPerStream, boolean isNewData)
OrderByProcessor
getSortKey
in interface OrderByProcessor
eventsPerStream
- is the row consisting of one event per streamisNewData
- is true for new data
public MultiKeyUntyped[] getSortKeyPerRow(EventBean[] generatingEvents, boolean isNewData)
OrderByProcessor
getSortKeyPerRow
in interface OrderByProcessor
generatingEvents
- is the rows consisting of one event per rowisNewData
- is true for new data
public EventBean[] sort(EventBean[] outgoingEvents, EventBean[][] generatingEvents, boolean isNewData)
OrderByProcessor
sort
in interface OrderByProcessor
outgoingEvents
- - the events to be sortedgeneratingEvents
- - the events that generated the output events (each event has a corresponding array of generating events per different event streams)isNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)
public EventBean[] sort(EventBean[] outgoingEvents, EventBean[][] generatingEvents, MultiKeyUntyped[] groupByKeys, boolean isNewData)
OrderByProcessor
sort
in interface OrderByProcessor
outgoingEvents
- - the events to sortgeneratingEvents
- - the events that generated the output events (each event has a corresponding array of generating events per different event streams)groupByKeys
- - the keys to use for determining the group-by group of output eventsisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)
protected static int compareValues(Object valueOne, Object valueTwo, boolean descending)
valueOne
- -first value to compare, can be nullvalueTwo
- -second value to compare, can be nulldescending
- - true if ascending, false if descending
public EventBean[] sort(EventBean[] outgoingEvents, MultiKeyUntyped[] orderKeys)
OrderByProcessor
sort
in interface OrderByProcessor
outgoingEvents
- is the events to sortorderKeys
- is the keys to sort by
|
© 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 |