rluvaton commented on code in PR #17163: URL: https://github.com/apache/datafusion/pull/17163#discussion_r2288446359
########## datafusion/physical-plan/src/sorts/sort.rs: ########## @@ -673,14 +756,13 @@ impl ExternalSorter { .into_iter() .map(|batch| { let metrics = self.metrics.baseline.intermediate(); - let reservation = self - .reservation - .split(get_reserved_byte_for_record_batch(&batch)); + let reservation = self.reservation.split( + get_reserved_byte_for_record_batch(&batch, self.cursor_batch_ratio), + ); Review Comment: `sort_batch_stream` sort a single batch using `sort_batch` why there is a need for `cursor_batch_ratio` here? isn't it only used when using `SortPreservingMergeStream` with cursor sort key fallback -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org