Skip to content

Commit

Permalink
fix: Skip buffered rows which are not joined with streamed side when …
Browse files Browse the repository at this point in the history
…checking join filter results
  • Loading branch information
viirya committed Aug 25, 2024
1 parent cb3ec77 commit 0e6e5a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/physical-plan/src/joins/sort_merge_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,12 @@ impl SMJStream {
// we need to output it with nulls as streamed side.
if matches!(self.join_type, JoinType::Full) {
for i in 0..pre_mask.len() {
// If the buffered row is not joined with streamed side,
// skip it.
if buffered_indices.is_null(i) {
continue;
}

let buffered_batch = &mut self.buffered_data.batches
[chunk.buffered_batch_idx.unwrap()];
let buffered_index = buffered_indices.value(i);
Expand Down

0 comments on commit 0e6e5a2

Please sign in to comment.