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 2019/10/25 13:41:43 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #26250: [SPARK-28560][SQL][followup] change the local shuffle reader from leaf node to unary node

cloud-fan commented on a change in pull request #26250: [SPARK-28560][SQL][followup] change the local shuffle reader from leaf node to unary node
URL: https://github.com/apache/spark/pull/26250#discussion_r339058196
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/ReduceNumShufflePartitions.scala
 ##########
 @@ -70,7 +70,8 @@ case class ReduceNumShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
     }
     // ShuffleExchanges introduced by repartition do not support changing the number of partitions.
     // We change the number of partitions in the stage only if all the ShuffleExchanges support it.
-    if (!shuffleStages.forall(_.plan.canChangeNumPartitions)) {
 
 Review comment:
   We can change the logic of collecting shuffle stages:
   ```
   def collectShuffleStages(plan: SparkPlan): Seq[ShuffleQueryStageExec] = plan match {
     case _: LocalShuffleReaderExec = Nil
     case stage: ShuffleQueryStageExec => Seq(stage)
     case ReusedQueryStageExec(_, stage: ShuffleQueryStageExec, _) => Seq(stage) 
     case _ => plan.children.flatMap(collectShuffleStages)
   }
   
   val shuffleStages = collectShuffleStages(plan)
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org