Kent Yao created SPARK-56258:
--------------------------------

             Summary: Make MetricUtils.stringValue lenient for unknown metric 
types
                 Key: SPARK-56258
                 URL: https://issues.apache.org/jira/browse/SPARK-56258
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 4.2.0
            Reporter: Kent Yao


MetricUtils.stringValue throws SparkException.internalError on unknown metric 
types, which is over-defensive for a UI rendering function. A crash at display 
time is worse than showing a degraded metric.

Change to best-effort rendering: log at DEBUG level and format as '[unknown] N' 
with NumberFormat. This also enables downstream projects (Gluten, Comet) to 
define custom metric types without Spark core throwing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to