Versions Compared

Key

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

...

Code Block
languagebash
Flink SQL> create catalog cat2 comment 'hello' WITH ( 'type'='generic_in_memory', 'default-database'='db');
[INFO] Execute statement succeeded.

Flink SQL> create catalog if not exists cat2 comment 'hello2' WITH ( 'type'='generic_in_memory', 'default-database'='db');
[INFO] Execute statement succeeded.

6. ALTER CATALOG catalog_name COMMENT comment1

Set comments in the specified catalog. If a particular comment is already set in the catalog, override the old value with the new one.

Code Block
languagesql
Flink SQL> create catalog cat2 WITH ( 'type'='generic_in_memory', 'default-database'='db');
[INFO] Execute statement succeeded.

Flink SQL> describe catalog cat2;
+-----------+-------------------+
| info name |        info value |
+-----------+-------------------+
|      name |              cat2 |
|      type | generic_in_memory |
|   comment |                   |
+-----------+-------------------+
3 rows in set

Flink SQL> alter catalog cat2 comment 'hello';
[INFO] Execute statement succeeded.

Flink SQL> describe catalog cat2;
+-----------+-------------------+
| info name |        info value |
+-----------+-------------------+
|      name |              cat2 |
|      type | generic_in_memory |
|   comment |             hello |
+-----------+-------------------+
3 rows in set


API Changes

  • For syntax 1 and 2: introduce CatalogManager.getCatalogDescriptor()

  • For syntax 3 and 4: introduce CatalogManager.alterCatalog()
  • For syntax 5 and 6: introduce CatalogDescriptor.getComment(), add `comment` argument to constructor method

...