jonathanc-n commented on code in PR #20810:
URL: https://github.com/apache/datafusion/pull/20810#discussion_r2902234940


##########
datafusion/physical-plan/src/joins/hash_join/stream.rs:
##########
@@ -655,10 +655,10 @@ impl HashJoinStream {
                 self.join_type,
             )?;
             timer.done();
-
+            self.output_buffer.push_batch(result)?;
             self.state = HashJoinStreamState::FetchProbeBatch;
 
-            return Ok(StatefulStreamResult::Ready(Some(result)));
+            return Ok(StatefulStreamResult::Continue);

Review Comment:
   @Dandandan We can replicate the pattern you added with 
`LimitedBatchCoalescer` and updating metrics in `poll_next_impl` throughout the 
codebase



##########
datafusion/physical-plan/src/joins/hash_join/stream.rs:
##########
@@ -655,10 +655,10 @@ impl HashJoinStream {
                 self.join_type,
             )?;
             timer.done();
-
+            self.output_buffer.push_batch(result)?;
             self.state = HashJoinStreamState::FetchProbeBatch;
 
-            return Ok(StatefulStreamResult::Ready(Some(result)));
+            return Ok(StatefulStreamResult::Continue);

Review Comment:
   I think we can slowly transition everything to slowly not need to variants 
of `StatefulStreamResult`, maybe an issue can be raised for this. It goes hand 
in hand with using the limited batch coalescer



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