RussellSpitzer commented on code in PR #12133: URL: https://github.com/apache/iceberg/pull/12133#discussion_r1934752632
########## core/src/main/java/org/apache/iceberg/actions/SizeBasedDataRewriter.java: ########## @@ -47,12 +47,19 @@ public abstract class SizeBasedDataRewriter extends SizeBasedFileRewriter<FileSc public static final String DELETE_FILE_THRESHOLD = "delete-file-threshold"; public static final int DELETE_FILE_THRESHOLD_DEFAULT = Integer.MAX_VALUE; - private static final double DELETE_RATIO_THRESHOLD = 0.3; + private final double deleteRatioThreshold; private int deleteFileThreshold; - protected SizeBasedDataRewriter(Table table) { + protected SizeBasedDataRewriter(Table table, double deleteRatioThreshold) { super(table); + this.deleteRatioThreshold = deleteRatioThreshold; + this.deleteFileThreshold = DELETE_FILE_THRESHOLD_DEFAULT; + } + + // Default constructor + public SizeBasedDataRewriter(Table table) { + this(table, 0.3); // Providing default deleteRatioThreshold Review Comment: Rather than having a magic number here we should keep DELETE_RATIO_THRESHOLD and rename it DEFAULT_DELETE_THRESHOLD and use that here -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org