comphead commented on code in PR #10892: URL: https://github.com/apache/datafusion/pull/10892#discussion_r1638422703
########## datafusion/physical-plan/src/joins/sort_merge_join.rs: ########## @@ -1098,49 +1107,52 @@ impl SMJStream { // 2. freezes NULLs joined to dequeued buffered batch to "release" it fn freeze_dequeuing_buffered(&mut self) -> Result<()> { self.freeze_streamed()?; - self.freeze_buffered(1)?; + // Only freeze and produce the first batch in buffered_data as the batch is fully processed + self.freeze_buffered(1, true)?; Ok(()) } // Produces and stages record batch from buffered indices with corresponding // NULLs on streamed side. // // Applicable only in case of Full join. - fn freeze_buffered(&mut self, batch_count: usize) -> Result<()> { + fn freeze_buffered( + &mut self, + batch_count: usize, + output_join_filter_fail_batch: bool, Review Comment: I'd say we can invent better naming here, but nothing comes to my mind. Perhaps `output_joined_not_matched` And would be nice to have a comments on this boolean flag what it does -- 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