You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Bowen Li (Jira)" <ji...@apache.org> on 2019/12/11 05:34:00 UTC

[jira] [Created] (FLINK-15188) add builder for catalog objects

Bowen Li created FLINK-15188:
--------------------------------

             Summary: add builder for catalog objects
                 Key: FLINK-15188
                 URL: https://issues.apache.org/jira/browse/FLINK-15188
             Project: Flink
          Issue Type: Task
          Components: Table SQL / API
            Reporter: Bowen Li
            Assignee: Kurt Young


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:

{code:java}
var table = new CatalogTableImpl(tableSchema, properties, comment)
{code}

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: 

{code:java}
var catalog = ...
catalog.createDatabase("mydb", new Database().withProperties().xxx(), false)
catalog.createTable("name", new Kafka().xxx().xxx(), false)
{code}

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




--
This message was sent by Atlassian Jira
(v8.3.4#803005)