The groupBy operation doesn't involve any repartitioning. The groupBy operation converts the input stream into a grouped stream. The main function of the groupBy operation is to modify the behavior of subsequent aggregate functions.
![](https://static.packt-cdn.com/products/9781787125636/graphics/assets/640e7085-03dc-4abb-a393-a1709371c8f6.png)
The groupBy operation doesn't involve any repartitioning. The groupBy operation converts the input stream into a grouped stream. The main function of the groupBy operation is to modify the behavior of subsequent aggregate functions.
If the groupBy operation is used before a partitionAggregate, then the partitionAggregate will run the aggregate on each group created within the partition.
If the groupBy operation is used before an aggregate, then input tuples is first repartition and...