Top-K without a sort: how DataFusion keeps a bounded heap of the k smallest rows
Instead of sorting N rows to keep k, DataFusion encodes sort keys in Arrow’s row format, keeps the k best rows in a binary heap, and publishes a dynamic filter so the scan below …