alamb commented on code in PR #15562: URL: https://github.com/apache/datafusion/pull/15562#discussion_r2028886906
########## datafusion/physical-plan/src/sorts/merge.rs: ########## @@ -241,10 +239,13 @@ impl<C: CursorValues> SortPreservingMergeStream<C> { _ => { // If the polling result is Poll::Ready(Some(batch)) or Poll::Ready(None), // we remove this partition from the queue so it is not polled again. - self.uninitiated_partitions.retain(|idx| *idx != i); + self.uninitiated_partitions.pop_front(); } } } + + // Claim the memory for the uninitiated partitions Review Comment: I see -- I believe you are right. -- 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