sunjincheng121 commented on a change in pull request #8472: 
[FLINK-12327][python] Adds support to submit Python Table API job in CliFrontend
URL: https://github.com/apache/flink/pull/8472#discussion_r286388978
 
 

 ##########
 File path: 
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
 ##########
 @@ -185,8 +186,10 @@ protected void run(String[] args) throws Exception {
                        return;
                }
 
-               if (runOptions.getJarFilePath() == null) {
-                       throw new CliArgsException("The program JAR file was 
not specified.");
+               // the job is not specified a jar file or a Python job.
+               if (!(runOptions.getJarFilePath() != null || 
runOptions.isPython())) {
+                       throw new CliArgsException("The program should be 
specified a JAR file " +
+                               "or a python file(or module)");
 
 Review comment:
   How about using the following code logic:
   ```
                if (!runOptions.isPython()) {
              // Java program should be specified a JAR file
                        if (runOptions.getJarFilePath() == null) {
                                throw new CliArgsException("Java program should 
be specified a JAR file.");
                }
   ```
   What do you think?

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