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-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to