zhuzhurk commented on code in PR #20633:
URL: https://github.com/apache/flink/pull/20633#discussion_r952244924


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java:
##########
@@ -152,6 +156,26 @@ public Set<URL> getLocalJarResources() {
                 .collect(Collectors.toSet());
     }
 
+    /**
+     * Adds the local jar resources to the given {@link TableConfig}. It 
implicitly considers the
+     * {@link TableConfig#getRootConfiguration()} and stores the merged result 
into {@link
+     * TableConfig#getConfiguration()}.
+     */
+    public void addJarConfiguration(TableConfig tableConfig) {
+        final List<String> jars =
+                
getLocalJarResources().stream().map(URL::toString).collect(Collectors.toList());
+        if (jars.isEmpty()) {
+            return;
+        }
+        final Set<String> jarFiles =
+                tableConfig
+                        .getOptional(PipelineOptions.JARS)
+                        .map(HashSet::new)

Review Comment:
   A `LinkedHashSet` may be better to retain the order as configured by users.



-- 
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...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to