LuciferYang commented on code in PR #37843:
URL: https://github.com/apache/spark/pull/37843#discussion_r967687534
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/metric/CustomAvgMetric.java:
##########
@@ -33,7 +33,11 @@ public abstract class CustomAvgMetric implements
CustomMetric {
@Override
public String aggregateTaskMetrics(long[] taskMetrics) {
if (taskMetrics.length > 0) {
- double average = ((double)Arrays.stream(taskMetrics).sum()) /
taskMetrics.length;
+ long sum = 0L;
Review Comment:
The advantage of using loop in Java 8 is obvious
--
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]