alamb commented on code in PR #6449:
URL: https://github.com/apache/arrow-datafusion/pull/6449#discussion_r1212358351


##########
datafusion/core/src/physical_plan/coalesce_partitions.rs:
##########
@@ -199,6 +200,28 @@ impl Stream for MergeStream {
         cx: &mut std::task::Context<'_>,
     ) -> Poll<Option<Self::Item>> {
         let poll = self.input.poll_recv(cx);
+
+        // If the input stream is done, wait for all tasks to finish and return
+        // the failure if any.
+        if let Poll::Ready(None) = poll {
+            let fut = self.tasks.join_next();

Review Comment:
   BTW I have been working on writing a test for this as part of 
https://github.com/apache/arrow-datafusion/pull/6507



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to