Github user gengliangwang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23002#discussion_r232706992
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala
 ---
    @@ -159,7 +159,7 @@ class SQLAppStatusListener(
       }
     
       private def aggregateMetrics(exec: LiveExecutionData): Map[Long, String] 
= {
    -    val metricIds = exec.metrics.map(_.accumulatorId).sorted
    +    val metricIds = exec.metrics.map(_.accumulatorId).toSet
         val metricTypes = exec.metrics.map { m => (m.accumulatorId, 
m.metricType) }.toMap
         val metrics = exec.stages.toSeq
           .flatMap { stageId => Option(stageMetrics.get(stageId)) }
    --- End diff --
    
    Consider also change the following `flatMap` / `filter`  / `groupBy` into 
`while` loop


---

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

Reply via email to