godfreyhe commented on a change in pull request #12355:
URL: https://github.com/apache/flink/pull/12355#discussion_r434424341



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
##########
@@ -253,7 +253,13 @@ public boolean submitUpdate(String statement) {
        // 
--------------------------------------------------------------------------------------------
 
        private Optional<SqlCommandCall> parseCommand(String line) {
-               final Optional<SqlCommandCall> parsedLine = 
SqlCommandParser.parse(executor.getSqlParser(sessionId), line);
+               final Optional<SqlCommandCall> parsedLine;
+               try {
+                       parsedLine = 
SqlCommandParser.parse(executor.getSqlParser(sessionId), line);
+               } catch (SqlExecutionException e) {
+                       printExecutionException(e);
+                       return Optional.empty();
+               }
                if (!parsedLine.isPresent()) {
                        printError(CliStrings.MESSAGE_UNKNOWN_SQL);

Review comment:
       I think we should keep this. because when TableEnvironment supports new 
operation but forgets to update SqlCommandParser, we should print error here or 
throw exception in SqlCommandParser




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


Reply via email to