You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/02/25 07:18:17 UTC
[GitHub] [flink] wuchong commented on a change in pull request #14725: [FLINK-20977] Fix use the "USE DATABASE" command bug
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:
users@infra.apache.org