kiszk commented on a change in pull request #23420: [SPARK-26508][Core][SQL]
Address warning messages in Java reported at lgtm.com
URL: https://github.com/apache/spark/pull/23420#discussion_r244623896
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/util/ByteUnit.java
##########
@@ -54,7 +54,7 @@ public double toBytes(long d) {
if (d < 0) {
throw new IllegalArgumentException("Negative size value. Size must be
positive: " + d);
}
- return d * multiplier;
+ return d * (double)multiplier;
Review comment:
I realized that we need `return double` since `return long` causes a failure
at
[here](https://github.com/apache/spark/blob/master/core/src/test/scala/org/apache/spark/util/UtilsSuite.scala#L229)
regarding terabyte.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]