Skip to content

Commit e063206

Browse files
Davies Liudavies
authored andcommitted
[SPARK-16439] [SQL] bring back the separator in SQL UI
## What changes were proposed in this pull request? Currently, the SQL metrics looks like `number of rows: 111111111111`, it's very hard to read how large the number is. So a separator was added by #12425, but removed by #14142, because the separator is weird in some locales (for example, pl_PL), this PR will add that back, but always use "," as the separator, since the SQL UI are all in English. ## How was this patch tested? Existing tests. ![metrics](https://cloud.githubusercontent.com/assets/40902/14573908/21ad2f00-030d-11e6-9e2c-c544f30039ea.png) Author: Davies Liu <[email protected]> Closes #15106 from davies/metric_sep.
1 parent 80d6655 commit e063206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.spark.sql.execution.metric
1919

2020
import java.text.NumberFormat
21+
import java.util.Locale
2122

2223
import org.apache.spark.SparkContext
2324
import org.apache.spark.scheduler.AccumulableInfo
@@ -101,8 +102,7 @@ object SQLMetrics {
101102
*/
102103
def stringValue(metricsType: String, values: Seq[Long]): String = {
103104
if (metricsType == SUM_METRIC) {
104-
val numberFormat = NumberFormat.getInstance()
105-
numberFormat.setGroupingUsed(false)
105+
val numberFormat = NumberFormat.getIntegerInstance(Locale.ENGLISH)
106106
numberFormat.format(values.sum)
107107
} else {
108108
val strFormat: Long => String = if (metricsType == SIZE_METRIC) {

0 commit comments

Comments
 (0)