| Merges one aggregator into a another aggregator.
Merges two partial aggregates results into a single result.
Needed for:
- parallel aggregation
- vector aggregation (GROUP BY)
- distinct aggregates (e.g. MAX(DISTINCT Col))
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();
}
Parameters: inputAggregator - the other Aggregator (input partial aggregate) exception: StandardException - on error |