Behavior of a user-defined Derby aggregator. Aggregates values of type V and returns a result of type R. In addition to the methods in the interface, implementing classes must have a 0-arg public constructor.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | merge(A
The other Aggregator to merge with otherAggregator)For merging another partial result into this Aggregator. |
| public R |
| accumulate | back to summary |
|---|---|
| public void accumulate(V value) Accumulate the next scalar value
| |
| init | back to summary |
|---|---|
| public void init() Initialize the Aggregator | |
| merge | back to summary |
|---|---|
| public void merge(A otherAggregator) For merging another partial result into this Aggregator. This lets the SQL interpreter divide the incoming rows into subsets, aggregating each subset in isolation, and then merging the partial results together. This method can be called when performing a grouped aggregation with a large number of groups. While processing such a query, Derby may write intermediate grouped results to disk. The intermediate results may be retrieved and merged with later results if Derby encounters later rows which belong to groups whose intermediate results have been written to disk. This situation can occur with a query like the following: select a, mode( b ) from mode_inputs group by a order by a
| |
| terminate | back to summary |
|---|---|
| public R terminate() Return the result scalar value
| |