You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by dh...@apache.org on 2023/11/01 09:05:55 UTC
(arrow-datafusion) branch main updated: doc: minor fix to SortExec::with_fetch comment (#8011)
This is an automated email from the ASF dual-hosted git repository.
dheres pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new aef95edf9b doc: minor fix to SortExec::with_fetch comment (#8011)
aef95edf9b is described below
commit aef95edf9bf1324be8642146c882b8d4c89a3785
Author: Weston Pace <we...@gmail.com>
AuthorDate: Wed Nov 1 02:05:50 2023 -0700
doc: minor fix to SortExec::with_fetch comment (#8011)
---
datafusion/physical-plan/src/sorts/sort.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/datafusion/physical-plan/src/sorts/sort.rs b/datafusion/physical-plan/src/sorts/sort.rs
index c7d676493f..08fa2c25d7 100644
--- a/datafusion/physical-plan/src/sorts/sort.rs
+++ b/datafusion/physical-plan/src/sorts/sort.rs
@@ -735,7 +735,13 @@ impl SortExec {
self
}
- /// Whether this `SortExec` preserves partitioning of the children
+ /// Modify how many rows to include in the result
+ ///
+ /// If None, then all rows will be returned, in sorted order.
+ /// If Some, then only the top `fetch` rows will be returned.
+ /// This can reduce the memory pressure required by the sort
+ /// operation since rows that are not going to be included
+ /// can be dropped.
pub fn with_fetch(mut self, fetch: Option<usize>) -> Self {
self.fetch = fetch;
self