Fixed partitioning function for Aggregator.