Aggregator plugins can group records together and then aggregate each group. The interface looks like:
We have seen use cases where there is a need to sort the values within a group before aggregating them. In other words, the Iterator in aggregate should return values in a sorted order. To support this, we should think about adding a sortBy() method to the aggregator, that would logically sort all GROUP_VALUE objects within a GROUP_KEY before aggregate() is called.