Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.9.0
Description
sql-client crashes if user tries to switch to a non-existing DB:
Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue. at org.apache.flink.table.client.SqlClient.main(SqlClient.java:206) Caused by: org.apache.flink.table.catalog.exceptions.CatalogException: A database with name [foo] does not exist in the catalog: [myhive]. at org.apache.flink.table.catalog.CatalogManager.setCurrentDatabase(CatalogManager.java:286) at org.apache.flink.table.api.internal.TableEnvironmentImpl.useDatabase(TableEnvironmentImpl.java:398) at org.apache.flink.table.client.gateway.local.LocalExecutor.lambda$useDatabase$5(LocalExecutor.java:258) at org.apache.flink.table.client.gateway.local.ExecutionContext.wrapClassLoader(ExecutionContext.java:216) at org.apache.flink.table.client.gateway.local.LocalExecutor.useDatabase(LocalExecutor.java:256) at org.apache.flink.table.client.cli.CliClient.callUseDatabase(CliClient.java:434) at org.apache.flink.table.client.cli.CliClient.callCommand(CliClient.java:282) at java.util.Optional.ifPresent(Optional.java:159) at org.apache.flink.table.client.cli.CliClient.open(CliClient.java:200) at org.apache.flink.table.client.SqlClient.openCli(SqlClient.java:123) at org.apache.flink.table.client.SqlClient.start(SqlClient.java:105) at org.apache.flink.table.client.SqlClient.main(SqlClient.java:194)
Attachments
Issue Links
- links to