Module order_by

Source

Structsยง

SortExecutor
Sort Executor
SortSpillManager ๐Ÿ”’
SortSpillManager is used to manage how to write spill data file and read them back. The spill data first need to be partitioned in a round-robin way. Each partition contains 1 file: input_chunks_file The spill file consume a data chunk and serialize the chunk into a protobuf bytes. Finally, spill file content will look like the below. The file write pattern is append-only and the read pattern is sequential scan. This can maximize the disk IO performance.