Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/hash_join/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,10 @@ async fn collect_left_input(
memory_counter: _,
} = state;

// Only time hash-table construction, not the `try_fold` above (that's the
// child's own compute).
let _build_timer = metrics.build_time.timer();

// Compute bounds
let mut bounds = match bounds_accumulators {
Some(accumulators) if num_rows > 0 => {
Expand Down
2 changes: 0 additions & 2 deletions datafusion/physical-plan/src/joins/hash_join/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,13 @@ impl HashJoinStream {
&mut self,
cx: &mut std::task::Context<'_>,
) -> Poll<Result<StatefulStreamResult<Option<RecordBatch>>>> {
let build_timer = self.join_metrics.build_time.timer();
// build hash table from left (build) side, if not yet done
let left_data = ready!(
self.build_side
.try_as_initial_mut()?
.left_fut
.get_shared(cx)
)?;
build_timer.done();

// Note: For null-aware anti join, we need to check the probe side (right) for NULLs,
// not the build side (left). The probe-side NULL check happens during process_probe_batch.
Expand Down