JingsongLi commented on code in PR #216:
URL: https://github.com/apache/flink-table-store/pull/216#discussion_r925314994


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/mergetree/compact/UniversalCompaction.java:
##########
@@ -144,15 +147,30 @@ private long candidateSize(List<LevelSortedRun> runs, int 
candidateCount) {
         return size;
     }
 
+    static CompactUnit createUnit(
+            List<LevelSortedRun> runs, int maxLevel, int runCount, Integer 
maxSortedRunNum) {
+        boolean withinMaxRun = maxSortedRunNum == null || maxSortedRunNum >= 
runCount;

Review Comment:
   Just:
   ```
   if (runCount > maxSortedRunNum) {
      runCount = maxSortedRunNum;
   }
   ```



##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/CoreOptions.java:
##########
@@ -244,6 +244,15 @@ public class CoreOptions implements Serializable {
                                     + "for append-only table, even if 
sum(size(f_i)) < targetFileSize. This value "
                                     + "avoids pending too much small files, 
which slows down the performance.");
 
+    public static final ConfigOption<Integer> COMPACTION_MAX_SORTED_RUN_NUM =
+            ConfigOptions.key("compaction.max-sorted-run-num")
+                    .intType()
+                    .noDefaultValue()

Review Comment:
   Can its default value is Integer.MAX?



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