pvary commented on code in PR #12979:
URL: https://github.com/apache/iceberg/pull/12979#discussion_r2104217262


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergSink.java:
##########
@@ -641,6 +716,17 @@ private static Map<String, String> writeProperties(
     return writeProperties;
   }
 
+  private static Map<String, String> filterPrefix(Map<String, String> config, 
String prefix) {
+    Map<String, String> newConfig = Maps.newHashMap();
+    config.forEach(
+        (key, value) -> {
+          if (key.startsWith(prefix)) {
+            newConfig.put(key, value);
+          }
+        });
+    return newConfig;
+  }

Review Comment:
   Maybe:
   ```
     private static Map<String, String> filterPrefix(Map<String, String> 
config, String prefix) {
       return config.entrySet().stream()
               .filter(entry -> entry.getKey().startsWith(prefix))
               .collect(Collectors.toMap(Map.Entry::getKey, 
Map.Entry::getValue));
     }
   ```



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