Top K per Partition: How DataFusion Replaces a Full Sort with N Small Heaps
DataFusion’s PartitionedTopK keeps one bounded heap per partition key, sharing a single row converter, memory reservation and row store, so a per-partition top-k costs O(N) instead …