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_r244594502
##########
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 agree with chaniging the precision. I will use `long` here.
I will also use `1L << 10`, ... in `enum ByteUnit`.
----------------------------------------------------------------
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]