cloud-fan commented on code in PR #40462:
URL: https://github.com/apache/spark/pull/40462#discussion_r1140007962
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1213,6 +1213,12 @@ object CollapseRepartition extends Rule[LogicalPlan] {
// child.
case r @ RebalancePartitions(_, child: RebalancePartitions, _) =>
r.withNewChildren(child.children)
+ // Case 5: When a LocalLimit has a child of Repartition we can remove the
Repartition.
Review Comment:
why we can remove it? can we put more explanation in the PR description?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1213,6 +1213,12 @@ object CollapseRepartition extends Rule[LogicalPlan] {
// child.
case r @ RebalancePartitions(_, child: RebalancePartitions, _) =>
r.withNewChildren(child.children)
+ // Case 5: When a LocalLimit has a child of Repartition we can remove the
Repartition.
Review Comment:
why we can remove it? can we put more explanation in the PR description and
code comments here?
--
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]