cloud-fan commented on code in PR #37295:
URL: https://github.com/apache/spark/pull/37295#discussion_r930744488
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1963,6 +1963,13 @@ object EliminateLimits extends Rule[LogicalPlan] {
case GlobalLimit(l, child) if canEliminate(l, child) =>
child
+ case Limit(IntegerLiteral(0), child) =>
Review Comment:
If the plan is `GlobalLimit(0, LocalLimit(0, child))`, I think this case is
useless as we can match `GlobalLimit(0, ...)` directly and turn the plan to
empty relation
--
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]