[ https://issues.apache.org/jira/browse/FLINK-13526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rui Li updated FLINK-13526: --------------------------- Summary: Switching to a non existing catalog or database crashes sql-client (was: Switching to a non existing database crashes sql-client) > Switching to a non existing catalog or database crashes sql-client > ------------------------------------------------------------------ > > Key: FLINK-13526 > URL: https://issues.apache.org/jira/browse/FLINK-13526 > Project: Flink > Issue Type: Bug > Components: Table SQL / Client > Reporter: Rui Li > Priority: Major > > sql-client crashes if user tries to switch to a non-existing DB: > {noformat} > 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) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.14#76016)