by malisper · 2w ago · 0 comments
1. Get the data from disk, which will be partitioned by storage key
2. Partition the data by grouping key (without aggregating it)
3. In parallel, aggregate each partition
4. Take the top K from each partition
5. Take the top K overall
Their optimization lets you save work across steps 3-5, as you only need to perform those steps on some partitions and not all of them.They also talk about "merging" these partitions at the end, and even while talking about their optimization they talk about this merging stage.