This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 786ed4843 [#2514] fix(spark3): Invalid decimal value conversion on
spark UI rendering (#2515)
786ed4843 is described below
commit 786ed484344163dc25fce5da8c858d199e6b3b16
Author: Junfan Zhang <[email protected]>
AuthorDate: Tue Jun 24 17:28:24 2025 +0800
[#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering
(#2515)
### What changes were proposed in this pull request?
Fix invalid decimal value conversion on spark UI rendering
### Why are the changes needed?
fix #2514
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Internal tests
---
.../extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala
b/client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala
index 7a3303e1d..25413d0cb 100644
---
a/client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala
+++
b/client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala
@@ -432,7 +432,11 @@ class ShufflePage(parent: ShuffleTab) extends
WebUIPage("") with Logging {
}
private def roundToTwoDecimals(value: Double): Double = {
- BigDecimal(value).setScale(2, BigDecimal.RoundingMode.HALF_UP).toDouble
+ if (value == null || value.isNaN || value.isInfinity) {
+ 0.0
+ } else {
+ BigDecimal(value).setScale(2, BigDecimal.RoundingMode.HALF_UP).toDouble
+ }
}
private def unionByServerId(write: ConcurrentHashMap[String,
AggregatedShuffleWriteMetric],