EmilyMatt commented on code in PR #22064:
URL: https://github.com/apache/datafusion/pull/22064#discussion_r3201219068


##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -1611,6 +1611,12 @@ impl NestedLoopJoinStream {
             }
         }
 
+        // If the left stream is fully exhausted, release its resources so the
+        // upstream pipeline can be torn down before we move on to probing.
+        if self.left_exhausted {
+            active.left_stream = None;
+        }
+
         if active.pending_batches.is_empty() {
             // No data at all — go directly to Done
             self.left_exhausted = true;

Review Comment:
   No bc above it can be converted back to false.
   I only placed it there bc if at the point I placed it it is set to true, it 
means the input is actually depleted.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to