|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExecAggregator
An ExecAggregator is the interface that execution uses to an aggregate. System defined aggregates will implement this directly.
The life time of an ExecAggregator is as follows.
Method Summary | |
---|---|
void |
accumulate(DataValueDescriptor addend,
java.lang.Object ga)
Iteratively accumulates the addend into the aggregator. |
boolean |
didEliminateNulls()
Return true if the aggregation eliminated at least one null from the input data set. |
DataValueDescriptor |
getResult()
Produces the result to be returned by the query. |
void |
merge(ExecAggregator inputAggregator)
Merges one aggregator into a another aggregator. |
ExecAggregator |
newAggregator()
Return a new initialized copy of this aggregator, any state set by the setup() method of the original Aggregator must be copied into the new aggregator. |
void |
setup(java.lang.String aggregateName)
Set's up the aggregate for processing. |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Methods inherited from interface org.apache.derby.iapi.services.io.TypedFormat |
---|
getTypeFormatId |
Method Detail |
---|
void setup(java.lang.String aggregateName)
void accumulate(DataValueDescriptor addend, java.lang.Object ga) throws StandardException
addend
- the DataValueDescriptor addend (current input to
the aggregation)ga
- a result set getter
StandardException
- on errorvoid merge(ExecAggregator inputAggregator) throws StandardException
An example of a merge would be: given two COUNT() aggregators, C1 and C2, a merge of C1 into C2 would set C1.count += C2.count. So, given a CountAggregator with a getCount() method that returns its counts, its merge method might look like this:
public void merge(ExecAggregator inputAggregator) throws StandardException { count += ((CountAccgregator)inputAggregator).getCount(); }
inputAggregator
- the other Aggregator
(input partial aggregate)
StandardException
- on errorDataValueDescriptor getResult() throws StandardException
StandardException
- on errorExecAggregator newAggregator()
boolean didEliminateNulls()
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |