cloud-fan commented on code in PR #46536:
URL: https://github.com/apache/spark/pull/46536#discussion_r1598097226
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -152,7 +152,15 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with
PredicateHelper with J
} else if (right.output.exists(_.semanticEquals(targetKey))) {
extract(right, AttributeSet.empty, hasHitFilter = false,
hasHitSelectiveFilter = false,
currentPlan = right, targetKey = targetKey).orElse {
- // We can also extract from the left side if the join keys are
transitive.
+ // We can also extract from the left side if the join keys are
transitive, and
+ // the left side always produces a superset output of join right
keys.
+ // Let's look at an example
+ // left table: 1, 2, 3
+ // right table, 3, 4
+ // right outer join output: (3, 3), (null, 4)
+ // right key output: 3, 4
+ // Any join side always produce a superset output of its
corresponding
+ // join keys, but for transitive join keys we need to check the
join type.
Review Comment:
shall we refine and move the comments to the beginning? Then we don't need
to duplicate it
--
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]