Skip to content

Commit aba15cd

Browse files
docs: clarify sort run ordering guarantee
1 parent e015ef7 commit aba15cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • datafusion/physical-plan/src/sorts

‎datafusion/physical-plan/src/sorts/sort.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ impl ExternalSorter {
784784
.build()
785785
}
786786

787-
/// Sort runs concurrently, preserving their order for the merge's equal-key ties.
787+
/// Sort runs concurrently, returning their streams in input order.
788788
async fn prepare_sort_runs(
789789
&mut self,
790790
runs: Vec<RecordBatch>,
@@ -814,7 +814,7 @@ impl ExternalSorter {
814814
Self::collect_prepared_runs(run_count, jobs).await
815815
}
816816

817-
/// Restore input order because the merge uses it to break equal-key ties.
817+
/// Restore input order so job completion order does not affect the merge's output.
818818
async fn collect_prepared_runs(
819819
run_count: usize,
820820
mut jobs: impl Stream<Item = Result<(usize, SendableRecordBatchStream)>> + Unpin,

0 commit comments

Comments
 (0)