maropu commented on a change in pull request #31630:
URL: https://github.com/apache/spark/pull/31630#discussion_r581895389
##########
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:
> Similarly for LEFT ANTI join without condition, we can convert join
logical plan node to an empty relation if right build side is not empty. Will
submit a followup PR tomorrow.
Ah, I see. That sounds reasonable. Nice idea, @c21 .
----------------------------------------------------------------
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]