sarutak commented on a change in pull request #28037: [SPARK-31271][UI] fix web ui for driver side SQL metrics URL: https://github.com/apache/spark/pull/28037#discussion_r398813069
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala ########## @@ -204,19 +202,19 @@ object SQLMetrics { } val validValues = values.filter(_ >= 0) - val Seq(sum, min, med, max) = { - val metric = if (validValues.isEmpty) { - val zeros = Seq.fill(4)(0L) - zeros.map(v => strFormat(v)) - } else { + if (validValues.length <= 1) { + strFormat(validValues.headOption.getOrElse(0)) Review comment: Same as [here](https://github.com/apache/spark/pull/28037/files#diff-803f475b01acfae1c5c96807c2ea9ddcR182). ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org