LinMingQiang commented on code in PR #4657:
URL: https://github.com/apache/paimon/pull/4657#discussion_r1915019424


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/CompactManifestProcedure.java:
##########
@@ -39,15 +42,21 @@ public String identifier() {
         return "compact_manifest";
     }
 
-    @ProcedureHint(argument = {@ArgumentHint(name = "table", type = 
@DataTypeHint("STRING"))})
-    public String[] call(ProcedureContext procedureContext, String tableId) 
throws Exception {
+    @ProcedureHint(
+            argument = {
+                @ArgumentHint(name = "table", type = @DataTypeHint("STRING")),
+                @ArgumentHint(name = "options", type = 
@DataTypeHint("STRING"), isOptional = true)
+            })
+    public String[] call(ProcedureContext procedureContext, String tableId, 
String options)
+            throws Exception {
 
-        FileStoreTable table =
-                (FileStoreTable)
-                        table(tableId)
-                                .copy(
-                                        Collections.singletonMap(
-                                                
CoreOptions.COMMIT_USER_PREFIX.key(), COMMIT_USER));
+        FileStoreTable table = (FileStoreTable) table(tableId);
+        Map<String, String> dynamicOptions = new HashMap<>();
+        dynamicOptions.put(CoreOptions.COMMIT_USER_PREFIX.key(), COMMIT_USER);
+        if (!StringUtils.isNullOrWhitespaceOnly(options)) {
+            
dynamicOptions.putAll(ParameterUtils.parseCommaSeparatedKeyValues(options));

Review Comment:
   use  putIfNotEmpty



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