mxm commented on code in PR #15566:
URL: https://github.com/apache/iceberg/pull/15566#discussion_r2906633622


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergSink.java:
##########
@@ -682,6 +698,14 @@ IcebergSink build() {
       FlinkMaintenanceConfig flinkMaintenanceConfig =
           new FlinkMaintenanceConfig(table, writeOptions, readableConfig);
 
+      // If the "compactMode" option is configured,
+      // add it as a separate maintenance task
+      if (flinkWriteConf.compactMode()) {
+        RewriteDataFilesConfig rewriteDataFilesConfig =
+            flinkMaintenanceConfig.createRewriteDataFilesConfig();
+        
maintenanceTasks.add(RewriteDataFiles.builder().config(rewriteDataFilesConfig));
+      }

Review Comment:
   It would be sensible to allow only one of each maintenance types, i.e. let 
that be the unit of configuration. Consequently, when `RewriteDataFiles` is 
configured, it should supersede "compaction mode".



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

Reply via email to