c21 commented on a change in pull request #31630:
URL: https://github.com/apache/spark/pull/31630#discussion_r581612766
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -555,6 +559,8 @@ object LimitPushDown extends Rule[LogicalPlan] {
join.copy(
left = maybePushLocalLimit(exp, left),
right = maybePushLocalLimit(exp, right))
+ case LeftSemi | LeftAnti if conditionOpt.isEmpty =>
+ join.copy(left = maybePushLocalLimit(exp, left))
Review comment:
I think we still need. Whether to output all rows or nothing, is
depending on whether right side is empty, and this can only be known during
runtime.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]