You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Shuyi Chen (JIRA)" <ji...@apache.org> on 2018/05/14 21:08:00 UTC

[jira] [Comment Edited] (FLINK-8866) Create unified interfaces to configure and instatiate TableSinks

    [ https://issues.apache.org/jira/browse/FLINK-8866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16474801#comment-16474801 ] 

Shuyi Chen edited comment on FLINK-8866 at 5/14/18 9:07 PM:
------------------------------------------------------------

Hi [~walterddr], [~twalthr], [~fhueske], thanks a lot for the comments. I think there are a few challenges for this JIRA,

1) there can be a lot of duplicate code dealing with the unified table sink instantiation if we do it in the same way as TableSourceFactory/TableSourceFactoryService. So we should try to refactor/redesign it to make it cleaner.

2) to support a table which can be both source and sink, we need to have a unified interface at least when interacting with Calcite, so the same table name can be used for the source and sink in SQL.

3) when registering tableSinks, the current registerTableSink interface took additional parameters _fieldName_ and _fieldTypes_, which I dont think it's necessary and add complexity when integrating with SQL DDL and SQL client.

I am experimenting the changes needed in my local branch, and writing a design doc. Would love to share the design doc soon when it's ready.


was (Author: suez1224):
Hi [~walterddr], [~twalthr], [~fhueske], thanks a lot for the comments. I think there are a few challenges for this JIRA,

1) there can be a lot of duplicate code dealing with the unified table sink instantiation if we do it in the same way as TableSourceFactory/TableSourceFactoryService. So we should try to refactor/redesign it to make it cleaner.

2) to support a table which can be both source and sink, we need to have a unified interface at least when interacting with Calcite, so the same table name can be used for the source and sink in SQL.

3) when registering tableSinks, the current registerTableSink interface took additional parameters _fieldName_ and _fieldTypes_, which I dont think it's necessary and add complexity when integrating with SQL DDL and SQL client.

I am experimenting the changes needed in my local branch, and writing a design doc. Would love to share the design doc soon when I think it's ready.

> Create unified interfaces to configure and instatiate TableSinks
> ----------------------------------------------------------------
>
>                 Key: FLINK-8866
>                 URL: https://issues.apache.org/jira/browse/FLINK-8866
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API &amp; SQL
>            Reporter: Timo Walther
>            Assignee: Shuyi Chen
>            Priority: Major
>
> Similar to the efforts done in FLINK-8240. We need unified ways to configure and instantiate TableSinks. Among other applications, this is necessary in order to declare table sinks in an environment file of the SQL client. Such that the sink can be used for {{INSERT INTO}} statements.
> Below are a few major changes in mind. 
> 1) Add TableSinkFactory/TableSinkFactoryService similar to TableSourceFactory/TableSourceFactoryService
> 2) Add a common property called "type" with values (source, sink and both) for both TableSource and TableSink.
> 3) in yaml file, replace "sources" with "tables", and use tableType to identify whether it's source or sink.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)