spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bersprockets <...@git.apache.org>
Subject [GitHub] spark pull request #20699: [SPARK-23544][SQL]Remove redundancy ShuffleExchan...
Date Thu, 08 Mar 2018 01:51:45 GMT
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


Mime
View raw message