Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
korowa committed Apr 17, 2024
1 parent 40424f1 commit e88e38c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datafusion/physical-plan/src/joins/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct JoinLeftData {
visited_indices_bitmap: Mutex<BooleanBufferBuilder>,
/// Counter of running probe-threads, potentially
/// able to update `visited_indices_bitmap`
running_threads_counter: AtomicUsize,
probe_threads_counter: AtomicUsize,
/// Memory reservation that tracks memory used by `hash_map` hash table
/// `batch`. Cleared on drop.
#[allow(dead_code)]
Expand All @@ -100,14 +100,14 @@ impl JoinLeftData {
hash_map: JoinHashMap,
batch: RecordBatch,
visited_indices_bitmap: SharedBitmapBuilder,
running_threads_counter: AtomicUsize,
probe_threads_counter: AtomicUsize,
reservation: MemoryReservation,
) -> Self {
Self {
hash_map,
batch,
visited_indices_bitmap,
running_threads_counter,
probe_threads_counter,
reservation,
}
}
Expand All @@ -130,7 +130,7 @@ impl JoinLeftData {
/// Decrements the counter of running threads, and returns `true`
/// if caller is the last running thread
fn report_probe_completed(&self) -> bool {
self.running_threads_counter.fetch_sub(1, Ordering::Relaxed) == 1
self.probe_threads_counter.fetch_sub(1, Ordering::Relaxed) == 1
}
}

Expand Down Expand Up @@ -837,7 +837,7 @@ async fn collect_left_input(
metrics: BuildProbeJoinMetrics,
reservation: MemoryReservation,
with_visited_indices_bitmap: bool,
right_input_partitions: usize,
probe_threads_count: usize,
) -> Result<JoinLeftData> {
let schema = left.schema();

Expand Down Expand Up @@ -934,7 +934,7 @@ async fn collect_left_input(
hashmap,
single_batch,
Mutex::new(visited_indices_bitmap),
AtomicUsize::new(right_input_partitions),
AtomicUsize::new(probe_threads_count),
reservation,
);

Expand Down

0 comments on commit e88e38c

Please sign in to comment.