czy006 commented on code in PR #4324:
URL: https://github.com/apache/amoro/pull/4324#discussion_r3802571088
##########
amoro-common/src/main/java/org/apache/amoro/config/OptimizingConfig.java:
##########
@@ -226,7 +226,9 @@ public OptimizingConfig setMinTargetSizeRatio(double
minTargetSizeRatio) {
}
public long maxFragmentSize() {
- return targetSize / fragmentRatio;
+ // A non-positive fragment ratio (misconfigured property or legacy
persisted value) means
+ // "no fragmenting": fall back to the target size instead of dividing by
zero in planners.
+ return fragmentRatio <= 0 ? targetSize : targetSize / fragmentRatio;
Review Comment:
Good catch. I updated the fallback to use the documented default fragment
ratio of 8, so the default 128 MiB target size yields a 16 MiB fragment
threshold. CommonPartitionEvaluator now calls
OptimizingConfig.maxFragmentSize() instead of performing the raw division, and
a planner-level regression test covers both zero and negative ratios.
--
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]