Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34914 FLIP-436: Introduce Catalog-related Syntax
  3. FLINK-34917

Support `CREATE CATALOG IF NOT EXISTS `with comment

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      We propose to introduce `getComment()` method in `CatalogDescriptor`, and the reasons are as follows.

      1. For the sake of design consistency, follow the design of FLIP-295 [1] which introduced `CatalogStore` component, `CatalogDescriptor` includes names and attributes, both of which are used to describe the catalog, and `comment` can be added smoothly.

      2. Extending the existing class rather than add new method to the existing interface, Especially, the `Catalog` interface, as a core interface, is used by a series of important components such as `CatalogFactory`, `CatalogManager` and `FactoryUtil`, and is implemented by a large number of connectors such as JDBC, Paimon, and Hive. Adding methods to it will greatly increase the implementation complexity, and more importantly, increase the cost of iteration, maintenance, and verification.

       

      IF NOT EXISTS  clause: If the catalog already exists, nothing happens.

      COMMENT clause: An optional string literal. The description for the catalog.

      NOTICE: we just need to introduce the '[IF NOT EXISTS]' and '[COMMENT]' clause to the 'create catalog' statement.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            liyubin117 Yubin Li
            liyubin117 Yubin Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment