Skip to content

Commit aef95ed

Browse files
authored
doc: minor fix to SortExec::with_fetch comment (#8011)
1 parent 3185783 commit aef95ed

File tree

1 file changed

+7
-1
lines changed
  • datafusion/physical-plan/src/sorts

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,13 @@ impl SortExec {
735735
self
736736
}
737737

738-
/// Whether this `SortExec` preserves partitioning of the children
738+
/// Modify how many rows to include in the result
739+
///
740+
/// If None, then all rows will be returned, in sorted order.
741+
/// If Some, then only the top `fetch` rows will be returned.
742+
/// This can reduce the memory pressure required by the sort
743+
/// operation since rows that are not going to be included
744+
/// can be dropped.
739745
pub fn with_fetch(mut self, fetch: Option<usize>) -> Self {
740746
self.fetch = fetch;
741747
self

0 commit comments

Comments
 (0)