Skip to content

Commit

Permalink
Improve documentation for sort()
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Aug 3, 2023
1 parent 773189f commit 8d7d08f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions datafusion/core/src/physical_plan/sorts/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,12 @@ impl ExternalSorter {
/// Returns the final sorted output of all batches inserted via
/// [`Self::insert_batch`] as a stream of [`RecordBatch`]es.
///
/// This may be an in memory sort/merge if all input fit into memory, or
/// a streaming merge from spill files on disk.
/// This process could either be:
///
/// 1. An in-memory sort/merge (if the input fit in memory)
///
/// 2. A combined streaming merge incorporating both in-memory
/// batches and data from spill files on disk.
fn sort(&mut self) -> Result<SendableRecordBatchStream> {
if self.spilled_before() {
let mut streams = vec![];
Expand Down

0 comments on commit 8d7d08f

Please sign in to comment.