You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "zuston (via GitHub)" <gi...@apache.org> on 2025/06/23 07:47:34 UTC

[PR] [#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering [uniffle]

zuston opened a new pull request, #2515:
URL: https://github.com/apache/uniffle/pull/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
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


Re: [PR] [#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering [uniffle]

Posted by "zuston (via GitHub)" <gi...@apache.org>.
zuston merged PR #2515:
URL: https://github.com/apache/uniffle/pull/2515


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


Re: [PR] [#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering [uniffle]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2515:
URL: https://github.com/apache/uniffle/pull/2515#issuecomment-2995401763

   ## Test Results
    3 049 files  ±0   3 049 suites  ±0   6h 47m 53s ⏱️ -45s
    1 186 tests ±0   1 185 ✅ ±0   1 💤 ±0  0 ❌ ±0 
   15 042 runs  ±0  15 027 ✅ ±0  15 💤 ±0  0 ❌ ±0 
   
   Results for commit b36d7bfc. ± Comparison against base commit a69930de.
   
   [test-results]:data:application/gzip;base64,H4sIAKgMWWgC/03Myw6DIBCF4VcxrLuYQQa0L9Mgl4TUS4OwavruRavU5flm8r+ZD6Nb2b1pQfS3hq05pOu2OeoUlrkIF0K1hco9bR+InTznY83G/Iz+9gyvzSp4HcYCUMHFuMRDYp73KoHgx6xVAq6qHVU64VLd9zVqlmkKqQw2tNKqwRtCLawk24HvlCFv0SEHhdiT8SCQfb6wjHaxFAEAAA==
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


Re: [PR] [#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering [uniffle]

Posted by "zuston (via GitHub)" <gi...@apache.org>.
zuston commented on code in PR #2515:
URL: https://github.com/apache/uniffle/pull/2515#discussion_r2161162467


##########
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:
   Nice catch. Let me recheck this of null



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


Re: [PR] [#2514] fix(spark3): Invalid decimal value conversion on spark UI rendering [uniffle]

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org