xxubai commented on code in PR #4324:
URL: https://github.com/apache/amoro/pull/4324#discussion_r3802956342


##########
amoro-common/src/main/java/org/apache/amoro/config/OptimizingConfig.java:
##########
@@ -226,7 +228,8 @@ public OptimizingConfig setMinTargetSizeRatio(double 
minTargetSizeRatio) {
   }
 
   public long maxFragmentSize() {
-    return targetSize / fragmentRatio;
+    int effectiveFragmentRatio = fragmentRatio > 0 ? fragmentRatio : 
DEFAULT_FRAGMENT_RATIO;
+    return targetSize / effectiveFragmentRatio;

Review Comment:
   I believe the param would be validated in `setFragmentRatio` instead of 
getter method. WDYT



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