comphead commented on code in PR #17562:
URL: https://github.com/apache/datafusion/pull/17562#discussion_r2349454328
##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -1249,8 +1290,197 @@ impl NestedLoopJoinStream {
Ok(true)
}
+ /// Process [l_start_index, l_start_index + l_count) JOIN right_batch
+ /// Returns a RecordBatch containing the join results (None if empty)
+ ///
+ /// Side Effect: If the join type requires, left or right side matched
bitmap
+ /// will be set for matched indices.
+ fn process_left_range_join(
+ &mut self,
+ left_data: &JoinLeftData,
+ right_batch: &RecordBatch,
+ l_start_index: usize,
+ l_row_count: usize,
+ ) -> Result<Option<RecordBatch>> {
+ // Construct the Cartesian product between the specified range of left
rows and the entire right_batch.
+ // Do not apply filters or update any bitmaps here.
+ let right_rows = right_batch.num_rows();
+ if l_row_count == 0 || right_rows == 0 {
Review Comment:
we can probably use this check even before calling `process_left_range_join`
?
--
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]