Skip to content

Commit cbcc8b0

Browse files
committed
Check filter pushdown sides for join types
1 parent 6d26c88 commit cbcc8b0

File tree

1 file changed

+6
-2
lines changed
  • datafusion/physical-plan/src/joins/hash_join

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,19 +788,23 @@ impl DisplayAs for HashJoinExec {
788788
}
789789
}
790790

791-
// TODO(crystal): double check if this is correct
792791
fn find_filter_pushdown_sides(join_type: JoinType) -> JoinSide {
792+
// This represents the side that will receive the dynamic filter and apply the bounds.
793+
// The other side will be the build side where we collect the bounds from.
794+
// Bounds accumulator only collect join key range from ON clause.
793795
match join_type {
794796
JoinType::Inner => JoinSide::Right,
795797
JoinType::Left => JoinSide::Right,
796798
JoinType::Right => JoinSide::Left,
797-
JoinType::Full => JoinSide::None,
798799
JoinType::LeftSemi => JoinSide::Right,
799800
JoinType::RightSemi => JoinSide::Left,
800801
JoinType::LeftAnti => JoinSide::Right,
801802
JoinType::RightAnti => JoinSide::Left,
802803
JoinType::LeftMark => JoinSide::Right,
803804
JoinType::RightMark => JoinSide::Left,
805+
// Full outer join cannot have dynamic filter pushdown because all rows on both
806+
// sides are preserved.
807+
JoinType::Full => JoinSide::None,
804808
}
805809
}
806810

0 commit comments

Comments
 (0)