wuchong commented on a change in pull request #14725:
URL: https://github.com/apache/flink/pull/14725#discussion_r582595061



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/SqlCommandParser.java
##########
@@ -256,7 +256,7 @@ private static SqlCommandCall parseBySqlParser(Parser 
sqlParser, String stmt) {
 
         USE_CATALOG,
 
-        USE,
+        USE("USE\\s+(.*)", SINGLE_OPERAND),

Review comment:
       I agree this can fix the problem. However, this fallbacks to the old way 
which uses regex to parse the SQL. We should use the TableEnvironment to parse 
the common SQL. 
   
   Therefore, a simple fix can be adding quotes for identifiers in 
`org.apache.flink.table.client.cli.CliClient#callUseDatabase`.




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