JingsongLi commented on code in PR #1069: URL: https://github.com/apache/incubator-paimon/pull/1069#discussion_r1186600257
########## paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactAction.java: ########## @@ -52,14 +54,18 @@ public class CompactAction extends ActionBase { private final CompactorSinkBuilder sinkBuilder; CompactAction(String warehouse, String database, String tableName) { - super(warehouse, database, tableName, new Options().set(CoreOptions.WRITE_ONLY, false)); + this(warehouse, database, tableName, new Options()); + } + + CompactAction(String warehouse, String database, String tableName, Options options) { + super(warehouse, database, tableName, options); if (!(table instanceof FileStoreTable)) { throw new UnsupportedOperationException( String.format( "Only FileStoreTable supports compact action. The table type is '%s'.", table.getClass().getName())); } - + table = table.copy(new Options().set(CoreOptions.WRITE_ONLY, false).toMap()); Review Comment: `Collections.singletonMap()`? -- 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...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org