Skip to content

Commit

Permalink
Fix: Sort Merge Join Left Semi crashes. Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
comphead committed May 17, 2024
1 parent 30f28fe commit 823f396
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions datafusion/physical-plan/src/joins/sort_merge_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,6 @@ impl SMJStream {
self.join_metrics.input_rows.add(batch.num_rows());
self.streamed_batch =
StreamedBatch::new(batch, &self.on_streamed);

self.streamed_state = StreamedState::Ready;
}
}
Expand Down Expand Up @@ -1010,7 +1009,7 @@ impl SMJStream {
if matches!(self.join_type, JoinType::LeftSemi) && self.filter.is_none() {
join_streamed = !self.streamed_joined;
// if the join filter specified there can be references to buffered columns
// so its needed to join them
// so buffered columns are needed to access them
join_buffered = self.filter.is_some();
}
if matches!(
Expand Down Expand Up @@ -1238,7 +1237,6 @@ impl SMJStream {
// Push the filtered batch to the output
let filtered_batch =
compute::filter_record_batch(&output_batch, mask)?;

self.output_record_batches.push(filtered_batch);

// For outer joins, we need to push the null joined rows to the output.
Expand Down

0 comments on commit 823f396

Please sign in to comment.