[
https://issues.apache.org/jira/browse/FLINK-20977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17265646#comment-17265646
]
Jun Zhang commented on FLINK-20977:
-----------------------------------
hi, [~jark] the exception is like this, I tracked the code and found that it
seems to be a calcite parsing error
{code:java}
Flink SQL> create database `mod`;
[INFO] Database has been created.
Flink SQL> show databases;
db
default
iceberg_db
mod
Flink SQL> use `mod`;
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.sql.parser.impl.ParseException: Incorrect syntax near the
keyword 'USE' at line 1, column 1.
Was expecting one of:
"ABS" ...
"ALTER" ...
"ARRAY" ...
"AVG" ...
"CALL" ...
"CARDINALITY" ...
"CASE" ...
{code}
> can not use `use` command to switch database
> ---------------------------------------------
>
> Key: FLINK-20977
> URL: https://issues.apache.org/jira/browse/FLINK-20977
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.12.0
> Reporter: Jun Zhang
> Priority: Major
> Fix For: 1.13.0
>
>
> I have a database which name is mod, when I use `use mod` to switch to the
> db,the system throw an exception, I surround it with backticks ,it is still
> not well
--
This message was sent by Atlassian Jira
(v8.3.4#803005)