wangyum commented on a change in pull request #33603:
URL: https://github.com/apache/spark/pull/33603#discussion_r684877019
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -913,10 +913,17 @@ object CollapseRepartition extends Rule[LogicalPlan] {
case (false, true) => if (r.numPartitions >= child.numPartitions) child
else r
case _ => r.copy(child = child.child)
}
+ case r @ Repartition(_, _, p @ Project(_, child: RepartitionOperation)) =>
Review comment:
Not all `RepartitionOperation` can be removed. Sometimes repartition
before joining and filtering to increase parallelism, especially before
`BroadcastNestedLoopJoin`.
--
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]