Skip to content

Commit 8d7d08f

Browse files
committed
Improve documentation for sort()
1 parent 773189f commit 8d7d08f

File tree

1 file changed

+6
-2
lines changed
  • datafusion/core/src/physical_plan/sorts

1 file changed

+6
-2
lines changed

datafusion/core/src/physical_plan/sorts/sort.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,12 @@ impl ExternalSorter {
291291
/// Returns the final sorted output of all batches inserted via
292292
/// [`Self::insert_batch`] as a stream of [`RecordBatch`]es.
293293
///
294-
/// This may be an in memory sort/merge if all input fit into memory, or
295-
/// a streaming merge from spill files on disk.
294+
/// This process could either be:
295+
///
296+
/// 1. An in-memory sort/merge (if the input fit in memory)
297+
///
298+
/// 2. A combined streaming merge incorporating both in-memory
299+
/// batches and data from spill files on disk.
296300
fn sort(&mut self) -> Result<SendableRecordBatchStream> {
297301
if self.spilled_before() {
298302
let mut streams = vec![];

0 commit comments

Comments
 (0)