configurable number of partitions in grouping