Skip to content

Commit

Permalink
comments & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
korowa committed Jan 14, 2024
1 parent 8f79fc6 commit 879cd41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/physical-plan/src/joins/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,8 @@ impl RecordBatchStream for HashJoinStream {
}
}

/// Lookups by hash agaist JoinHashMap and resolves potential hash collisions.
/// Executes lookups by hash against JoinHashMap and resolves potential
/// hash collisions.
/// Returns build/probe indices satisfying the equality condition, along with
/// starting point for next iteration.
///
Expand Down Expand Up @@ -1266,9 +1267,8 @@ impl HashJoinStream {
state.offset,
)?;

// apply join filters if exists
// apply join filter if exists
let (left_indices, right_indices) = if let Some(filter) = &self.filter {
// Filter the indices which satisfy the non-equal join condition, like `left.b1 = 10`
apply_join_filter_to_indices(
build_side.left_data.batch(),
&state.batch,
Expand Down
1 change: 1 addition & 0 deletions datafusion/physical-plan/src/joins/symmetric_hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ fn lookup_join_hashmap(
.iter()
.map(|c| c.evaluate(build_batch)?.into_array(build_batch.num_rows()))
.collect::<Result<Vec<_>>>()?;

hashes_buffer.clear();
hashes_buffer.resize(probe_batch.num_rows(), 0);
let hash_values = create_hashes(&keys_values, random_state, hashes_buffer)?;
Expand Down
1 change: 1 addition & 0 deletions datafusion/physical-plan/src/joins/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ impl JoinHashMap {
}
}

// Type of offsets for obtaining indices from JoinHashMap.
pub(crate) type JoinHashMapOffset = (usize, Option<u64>);

// Trait defining methods that must be implemented by a hash map type to be used for joins.
Expand Down

0 comments on commit 879cd41

Please sign in to comment.