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 2020/03/30 15:22:53 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #28022: [SPARK-31253][SQL] Add metrics to AQE shuffle reader

cloud-fan commented on a change in pull request #28022: [SPARK-31253][SQL] Add metrics to AQE shuffle reader
URL: https://github.com/apache/spark/pull/28022#discussion_r400279525
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeSkewedJoin.scala
 ##########
 @@ -317,43 +317,11 @@ private object ShuffleStage {
   private def getMapStats(stage: ShuffleQueryStageExec): MapOutputStatistics = {
     assert(stage.resultOption.isDefined, "ShuffleQueryStageExec should" +
       " already be ready when executing OptimizeSkewedPartitions rule")
-    stage.resultOption.get.asInstanceOf[MapOutputStatistics]
+    stage.mapStats
 
 Review comment:
   `mapStats` is called in more than one place. I think we should avoid duplicating the code.

----------------------------------------------------------------
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