wuchong commented on a change in pull request #10501: [FLINK-15139][table sql / 
client]misc end to end test failed  cause loss jars in converting to jobgraph
URL: https://github.com/apache/flink/pull/10501#discussion_r355889660
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
 ##########
 @@ -310,6 +316,14 @@ private static Configuration createExecutionConfig(
                Configuration executionConfig = 
activeCommandLine.applyCommandLineOptionsToConfiguration(
                                commandLine);
 
+               try {
+                       final ProgramOptions programOptions = new 
ProgramOptions(commandLine);
+                       final ExecutionConfigAccessor executionConfigAccessor = 
ExecutionConfigAccessor.fromProgramOptions(programOptions, dependencies);
+                       ConfigUtils.encodeCollectionToConfig(executionConfig, 
PipelineOptions.JARS, executionConfigAccessor.getJars(), URL::toString);
+               } catch (CliArgsException e) {
+                       throw new SqlExecutionException("Invalid deployment run 
options.", e);
+               }
 
 Review comment:
   You can simplify this into one line:
   
   ```java
                ConfigUtils.encodeCollectionToConfig(
                        executionConfig,
                        PipelineOptions.JARS,
                        dependencies,
                        URL::toString);
   ```
   
   We don't need to parse `commandLine` again here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to