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

add builder for catalog objects

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      currently we don't have builders for catalog objects, and users are forced to use raw impl classes of catalog objects. E.g. to new a catalog table in Table API, users have to do:

      var table = new CatalogTableImpl(tableSchema, properties, comment)
      

      which is not very nice.

      The same applies to CatalogDatabaseImpl, CatalogViewImpl, CatalogPartitionImpl. These impls are supposed to be internal classes, but we are exposing them to users.

      A better API experience would be:

      var catalog = ...
      catalog.createDatabase("mydb", new Database().withProperties().xxx(), false)
      catalog.createTable("name", new Kafka().xxx().xxx(), false)
      

      thus we may need to convert connector descriptor to catalog table impl, and add builders for other catalog objects.

      This may or may not be a high priority task, depending on how many users are registering tables in Table API v.s. using DDL

        Attachments

          Activity

            People

            • Assignee:
              ykt836 Kurt Young
              Reporter:
              phoenixjiangnan Bowen Li
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: