[
https://issues.apache.org/jira/browse/FLINK-15188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonard Xu resolved FLINK-15188.
--------------------------------
Release Note: Implemented in FLINK-21396
Resolution: Resolved
> add builder for catalog objects
> -------------------------------
>
> Key: FLINK-15188
> URL: https://issues.apache.org/jira/browse/FLINK-15188
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Reporter: Bowen Li
> Assignee: Kurt Young
> Priority: Major
> Labels: stale-assigned
>
> 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)