Skip to content

Apache DataFusion SQL Query Engine

Minor: rename variable for clarity (#6229)

Andrew Lambd8625a0389d8
diff --git a/datafusion/core/src/physical_plan/joins/nested_loop_join.rs b/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
index 64afcc478b..5908b8df93 100644
--- a/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
+++ b/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
@@ -374,22 +374,22 @@ struct NestedLoopJoinStream {
}
fn build_join_indices(
- left_index: usize,
- batch: &RecordBatch,
- left_data: &RecordBatch,
+ left_row_index: usize,
+ right_batch: &RecordBatch,
+ left_batch: &RecordBatch,
filter: Option<&JoinFilter>,
) -> Result<(UInt64Array, UInt32Array)> {
// left indices: [left_index, left_index, ...., left_index]
// right indices: [0, 1, 2, 3, 4,....,right_row_count]
- let right_row_count = batch.num_rows();
- let left_indices = UInt64Array::from(vec![left_index as u64; right_row_count]);
+ let right_row_count = right_batch.num_rows();
+ let left_indices = UInt64Array::from(vec![left_row_index as u64; right_row_count]);
let right_indices = UInt32Array::from_iter_values(0..(right_row_count as u32));
// in the nested loop join, the filter can contain non-equal and equal condition.
if let Some(filter) = filter {
apply_join_filter_to_indices(
- left_data,
- batch,
+ left_batch,
+ right_batch,
left_indices,
right_indices,
filter,