nastra commented on code in PR #12148:
URL: https://github.com/apache/iceberg/pull/12148#discussion_r1938255953
##########
core/src/main/java/org/apache/iceberg/actions/SizeBasedDataRewriter.java:
##########
@@ -60,13 +76,26 @@ public Set<String> validOptions() {
return ImmutableSet.<String>builder()
.addAll(super.validOptions())
.add(DELETE_FILE_THRESHOLD)
+ .add(DELETE_RATIO_THRESHOLD)
.build();
}
@Override
public void init(Map<String, String> options) {
super.init(options);
this.deleteFileThreshold = deleteFileThreshold(options);
+ this.deleteRatioThreshold = getDeleteRatioThreshold(options);
+ }
+
+ private double getDeleteRatioThreshold(Map<String, String> options) {
+ double value =
+ PropertyUtil.propertyAsDouble(
+ options, DELETE_RATIO_THRESHOLD, DELETE_RATIO_THRESHOLD_DEFAULT);
+ Preconditions.checkArgument(
+ value >= 0, "'%s' is set to negative but must be >= 0",
DELETE_RATIO_THRESHOLD);
Review Comment:
I think we should make sure that this is always > 0
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]