Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are a few DDLs following that is already supported in SQL client. We want them should be migrated using the Flink Sql Parser approach properly.

Catalog DDL:

We propose to add the following DDLs related to catalog operations.

  • showCatalogsStatement

...

SHOW CATALOGS

Return all catalogs in the current catalog.

note: already support in sql client but need support in TableEnvironment.

  • describeCatalogStatement

DESCRIBE CATALOG catalogName

Return the default database name and expalnCatalog(newly added method in the catalog) content of an existing catalogName 

Newly added method in Catalog.java:

/**
* Get a user defined catalog description.
* @return a user-implement catalog detailed explanation
*/
default String explainCatalog() {
    return String.format("CatalogClass:%s", this.getClass().getCanonicalName());
}

use eg:

Flink SQL> describe catalog hiveCatalog;
default database: default.
hiveVersion: 2.3.4
...

  • useCatalogStatement

USE CATALOG catalogName 

Set the current catalog. 

note: already support in sql client but need support in tEnv.sqlUpdate();

Database DDL:


We propose to add the following DDLs related to database operations.

...