You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/08/09 02:50:38 UTC
[GitHub] [spark] wangyum commented on a change in pull request #33603: [SPARK-36376][SQL] Collapse repartitions if there is a project between them
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org