jayzhan211 commented on code in PR #25255:
URL: https://github.com/apache/datafusion/pull/25255#discussion_r4005701554
##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -979,6 +979,58 @@ impl HashJoinExec {
Arc::new(DynamicFilterPhysicalExpr::new(right_keys, lit(true)))
}
+ /// Join types whose output rows all carry a matching key on both sides.
+ ///
+ /// For these a parent filter over one side's join keys can be transferred
+ /// to the other side's input: an input row that fails the transferred
+ /// filter can only pair with rows that fail the original, so pruning it
+ /// changes nothing, and once the transferred filter is applied exactly on
+ /// one side every output row satisfies the original. Outer, anti and mark
+ /// joins also emit unmatched rows, whose key on the other side is absent,
+ /// so the transferred filter is not exact for them.
+ fn supports_key_transfer(join_type: JoinType) -> bool {
+ matches!(
+ join_type,
+ JoinType::Inner | JoinType::LeftSemi | JoinType::RightSemi
Review Comment:
test added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]