cloud-fan commented on code in PR #50273: URL: https://github.com/apache/spark/pull/50273#discussion_r2007069742
########## sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEShuffleReadExec.scala: ########## @@ -200,7 +203,11 @@ case class AQEShuffleReadExec private( val numCoalescedPartitionsMetric = metrics("numCoalescedPartitions") val x = partitionSpecs.count(isCoalescedSpec) numCoalescedPartitionsMetric.set(x) - driverAccumUpdates += numCoalescedPartitionsMetric.id -> x + val numEmptyPartitionsMetric = metrics("numEmptyPartitions") Review Comment: can we simply calculate the metric value here by looking at the underlying shuffle stage? e.g. ``` child match { case s: ShuffleMapStage => s.mapStats.map(stats => stats.bytesByPartitionId.count(_ == 0)).getOrElse(0) case => 0 } ``` -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org