Skip to content

Commit b39f8f1

Browse files
committed
refactor: simplify presence-check doc and reuse the helper
Drop the explicit intra-doc link reference on `has_matchable_build_rows`: the inline `[`NullEquality::NullEqualsNothing`]` link resolves on its own since the type is in scope, so spelling out the path again is redundant. Also use `has_matchable_build_rows()` for the empty-build-side check in `HashJoinStream` instead of a raw `map().is_empty()`, keeping the presence checks consistent. No behavior change. Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
1 parent 9e05513 commit b39f8f1

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

datafusion/physical-plan/src/joins/hash_join/exec.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ impl JoinLeftData {
242242
/// Under [`NullEquality::NullEqualsNothing`] build rows whose join key is
243243
/// NULL are omitted from the map, so this can be `false` even when
244244
/// [`Self::has_build_rows`] is `true`.
245-
///
246-
/// [`NullEquality::NullEqualsNothing`]: datafusion_common::NullEquality::NullEqualsNothing
247245
pub(super) fn has_matchable_build_rows(&self) -> bool {
248246
!self.map().is_empty()
249247
}

datafusion/physical-plan/src/joins/hash_join/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ impl HashJoinStream {
779779
}
780780
}
781781

782-
let is_empty = build_side.left_data.map().is_empty();
782+
let is_empty = !build_side.left_data.has_matchable_build_rows();
783783

784784
if is_empty {
785785
let result = build_batch_empty_build_side(

0 commit comments

Comments
 (0)