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


##########
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:
   I thought about that as well. We already allow configuring Iceberg via table 
options, Flink config, or via the builder method. We don't allow just one way. 
I think this a bit of a similar case. 
   
   Granted, if we treat maintenance tasks as a single configuration option, 
then we should not allow builder-based and table options at the same time. 
However, if we think about the maintenance tasks as separate options, then it 
makes sense to allow both configuration styles at the same time. 



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