Jzjsnow commented on code in PR #3776:
URL: https://github.com/apache/amoro/pull/3776#discussion_r2602692460
##########
amoro-format-iceberg/src/main/java/org/apache/amoro/optimizing/plan/CommonPartitionEvaluator.java:
##########
@@ -208,6 +217,11 @@ private boolean addTargetSizeReachedFile(DataFile
dataFile, List<ContentFile<?>>
return false;
}
+ private void updateFileSizeSquaredErrorSum(DataFile dataFile) {
+ long diffSize = minTargetSize - Math.min(dataFile.fileSizeInBytes(),
minTargetSize);
+ fileSizeSquaredErrorSum += diffSize * diffSize;
Review Comment:
Thanks for catching this potential issue! I've fixed it by using
Long.MAX_VALUE as the upper bound to prevent numeric overflow in the relevant
logic.
--
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]