net.esper.eql.core
Interface OrderByProcessor

All Known Implementing Classes:
OrderByProcessorSimple

public interface OrderByProcessor

A processor for ordering output events according to the order specified in the order-by clause.


Method Summary
 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.
 

Method Detail

sort

EventBean[] sort(EventBean[] outgoingEvents,
                 EventBean[][] generatingEvents,
                 boolean isNewData)
Sort the output events. If the order-by processor needs group-by keys to evaluate the expressions in the order-by clause, these will be computed from the generating events.

Parameters:
outgoingEvents - - the events to be sorted
generatingEvents - - 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)
Returns:
an array containing the output events in sorted order

sort

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.

Parameters:
outgoingEvents - - the events to sort
generatingEvents - - 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 events
isNewData - - indicates whether we are dealing with new data (istream) or old data (rstream)
Returns:
an array containing the output events in sorted order

getSortKey

MultiKeyUntyped getSortKey(EventBean[] eventsPerStream,
                           boolean isNewData)
Returns the sort key for a given row.

Parameters:
eventsPerStream - is the row consisting of one event per stream
isNewData - is true for new data
Returns:
sort key

getSortKeyPerRow

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).

Parameters:
generatingEvents - is the rows consisting of one event per row
isNewData - is true for new data
Returns:
sort key for each row

sort

EventBean[] sort(EventBean[] outgoingEvents,
                 MultiKeyUntyped[] orderKeys)
Sort a given array of outgoing events using the sort keys returning a sorted outgoing event array.

Parameters:
outgoingEvents - is the events to sort
orderKeys - is the keys to sort by
Returns:
sorted events

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com