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)