jerqi commented on code in PR #2515:
URL: https://github.com/apache/uniffle/pull/2515#discussion_r2161109999
##########
client-spark/extension/src/main/scala/org/apache/spark/ui/ShufflePage.scala:
##########
@@ -417,7 +417,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.isNaN || value.isInfinity) {
+ 0.0
Review Comment:
Double has `NAN` value. Could use that directly?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]