cloud-fan commented on a change in pull request #28175: 
[SPARK-31253][SQL][FOLLOW-UP] Improve the partition data size metrics in 
CustomShuffleReaderExec
URL: https://github.com/apache/spark/pull/28175#discussion_r406711096
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CustomShuffleReaderExec.scala
 ##########
 @@ -128,6 +104,27 @@ case class CustomShuffleReaderExec private(
     Map("numSkewedPartitions" -> metrics)
   }
 
+  private def sendPartitionDataSizeMetrics(
+      executionId: String,
+      partitionMetrics: SQLMetric): Unit = {
+    val mapStats = shuffleStage.get.mapStats.get.bytesByPartitionId
 
 Review comment:
   Let's follow the previous code: 
https://github.com/apache/spark/pull/28175/files#diff-a42cafdbb5870e28c4e03df50ffc44f6L111
   
   If `shuffleStage.get.mapStats.isEmpty`, we send the metric value as 0 only 
once.

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