Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16421

Changing default catalog to hive without changing default database fails

    XMLWordPrintableJSON

Details

    Description

      The default database in Hive is caled "default" not "default_database". This causes an error when starting the SQL CLI with hive set as default catalog:

      Caused by: org.apache.flink.table.catalog.exceptions.CatalogException: A database with name [default_database] does not exist in the catalog: [hive].Caused by: org.apache.flink.table.catalog.exceptions.CatalogException: A database with name [default_database] does not exist in the catalog: [hive]. at org.apache.flink.table.catalog.CatalogManager.setCurrentDatabase(CatalogManager.java:174) at org.apache.flink.table.api.internal.TableEnvironmentImpl.useDatabase(TableEnvironmentImpl.java:631) at java.util.Optional.ifPresent(Optional.java:159) at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeCatalogs(ExecutionContext.java:561) at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeTableEnvironment(ExecutionContext.java:494) at org.apache.flink.table.client.gateway.local.ExecutionContext.<init>(ExecutionContext.java:159) at org.apache.flink.table.client.gateway.local.ExecutionContext.<init>(ExecutionContext.java:118) at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:744)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gyfora Gyula Fora
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: