thinkharderdev commented on code in PR #12523: URL: https://github.com/apache/datafusion/pull/12523#discussion_r1765123819
########## datafusion/physical-plan/src/joins/hash_join.rs: ########## @@ -1466,18 +1562,35 @@ impl HashJoinStream { /// Updates state to `Completed` fn process_unmatched_build_batch( &mut self, - ) -> Result<StatefulStreamResult<Option<RecordBatch>>> { + cx: &mut Context<'_>, + ) -> Poll<Result<StatefulStreamResult<Option<RecordBatch>>>> { let timer = self.join_metrics.join_time.timer(); if !need_produce_result_in_final(self.join_type) { self.state = HashJoinStreamState::Completed; - return Ok(StatefulStreamResult::Continue); + return Poll::Ready(Ok(StatefulStreamResult::Continue)); } let build_side = self.build_side.try_as_ready()?; if !build_side.left_data.report_probe_completed() { self.state = HashJoinStreamState::Completed; - return Ok(StatefulStreamResult::Continue); + return Poll::Ready(Ok(StatefulStreamResult::Continue)); + } + + if let Some(shared_state) = build_side.left_data.shared_state.as_ref() { Review Comment: When all local probe threads are complete and there is shared state we need to probe that before competing -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org