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


##########
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 think we can also add a upper limitation for fragmentRatio. it should be 
less or equals than `targetSize`



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