This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 28eebed34 [flink] Fix that sink.parallelism doesn't work in 
compact_database action (#2830)
28eebed34 is described below

commit 28eebed3485d2cd76f661de72af0b9ca60074976
Author: yuzelin <[email protected]>
AuthorDate: Wed Jan 31 17:32:00 2024 +0800

    [flink] Fix that sink.parallelism doesn't work in compact_database action 
(#2830)
---
 .../org/apache/paimon/flink/action/CompactDatabaseAction.java    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java
 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java
index cffa94dfc..a97b3048e 100644
--- 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java
+++ 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java
@@ -46,7 +46,6 @@ import org.slf4j.LoggerFactory;
 
 import javax.annotation.Nullable;
 
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -142,11 +141,11 @@ public class CompactDatabaseAction extends ActionBase {
                                                 table.getClass().getName()));
                                 continue;
                             }
+                            Map<String, String> dynamicOptions =
+                                    new HashMap<>(tableOptions.toMap());
+                            dynamicOptions.put(CoreOptions.WRITE_ONLY.key(), 
"false");
                             FileStoreTable fileStoreTable =
-                                    (FileStoreTable)
-                                            table.copy(
-                                                    Collections.singletonMap(
-                                                            
CoreOptions.WRITE_ONLY.key(), "false"));
+                                    (FileStoreTable) 
table.copy(dynamicOptions);
                             tableMap.put(fullTableName, fileStoreTable);
                         } else {
                             LOG.debug("The table {} is excluded.", 
fullTableName);

Reply via email to