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


##########
datafusion/core/src/physical_plan/coalesce_partitions.rs:
##########
@@ -199,6 +200,25 @@ 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 {
+            match Box::pin(self.tasks.join_next()).poll_unpin(cx) {

Review Comment:
   While I agree that it makes sense to add a `poll_join_next` method, you 
don't have to box here. You can use the `pin!` macro instead of boxing.



-- 
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