nvartolomei commented on code in PR #6449:
URL: https://github.com/apache/arrow-datafusion/pull/6449#discussion_r1205995636
##########
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:
I think this would help https://github.com/tokio-rs/tokio/pull/5721
##########
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:
I think this would help here a bit
https://github.com/tokio-rs/tokio/pull/5721
--
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]