We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3185783 commit aef95edCopy full SHA for aef95ed
datafusion/physical-plan/src/sorts/sort.rs
@@ -735,7 +735,13 @@ impl SortExec {
735
self
736
}
737
738
- /// Whether this `SortExec` preserves partitioning of the children
+ /// 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.
745
pub fn with_fetch(mut self, fetch: Option<usize>) -> Self {
746
self.fetch = fetch;
747
0 commit comments