Jzjsnow commented on code in PR #3776:
URL: https://github.com/apache/amoro/pull/3776#discussion_r2602689622


##########
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);

Review Comment:
   Great point! I've updated the comments clarifying that the squared error 
accumulation is only applied to files with size smaller than `minTargetSize`.



-- 
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]

Reply via email to