You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by bersprockets <gi...@git.apache.org> on 2018/03/08 01:51:45 UTC
[GitHub] spark pull request #20699: [SPARK-23544][SQL]Remove redundancy ShuffleExchan...
Github user bersprockets commented on a diff in the pull request:
https://github.com/apache/spark/pull/20699#discussion_r173042723
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/Exchange.scala ---
@@ -109,3 +109,15 @@ case class ReuseExchange(conf: SQLConf) extends Rule[SparkPlan] {
}
}
}
+
+/**
+ * Remove redundant [[ShuffleExchangeExec]] from a spark plan.
+ */
+case class RemoveRedundantExchange(conf: SQLConf) extends Rule[SparkPlan] {
+ def apply(plan: SparkPlan): SparkPlan = {
+ plan.transformUp {
--- End diff --
I looked at apply methods that contain only a transformUp and they nearly all look like this:
<pre>
def apply(plan: SparkPlan): SparkPlan = plan.transformUp {
etc.
}
</pre>
Your way is less confusing, but it doesn't appear to be the current style.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org