cloud-fan commented on a change in pull request #28153: [SPARK-31384][SQL] Fix 
NPE in OptimizeSkewedJoin
URL: https://github.com/apache/spark/pull/28153#discussion_r406110763
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -54,14 +53,10 @@ case class CoalesceShufflePartitions(session: 
SparkSession) extends Rule[SparkPl
     if (!shuffleStages.forall(_.shuffle.canChangeNumPartitions)) {
       plan
     } else {
-      val shuffleMetrics = shuffleStages.map { stage =>
-        assert(stage.resultOption.isDefined, "ShuffleQueryStageExec should 
already be ready")
-        stage.resultOption.get.asInstanceOf[MapOutputStatistics]
-      }
+      // `ShuffleQueryStageExec` returns None MapOutputStatistics when the 
input RDD
 
 Review comment:
   nit: `ShuffleQueryStageExec#mapStats` returns None when ...

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to