flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10156) Drop the Table.writeToSink() method
Date Thu, 11 Oct 2018 00:56:01 GMT

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

ASF GitHub Bot commented on FLINK-10156:
----------------------------------------

sunjincheng121 commented on a change in pull request #6805: [FLINK-10156][table] Deprecate
Table.writeToSink()
URL: https://github.com/apache/flink/pull/6805#discussion_r224279958
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
 ##########
 @@ -891,7 +891,13 @@ class Table(
     *
     * @param sink The [[TableSink]] to which the [[Table]] is written.
     * @tparam T The data type that the [[TableSink]] expects.
+    *
+    * @deprecated Will be removed in a future release. Please register the TableSink and
use
+    *             [[insertInto()]].
 
 Review comment:
   For the complete javadoc, we need to remove "[[", 
   [[insertInto()]] -> insertInto()
   ![image](https://user-images.githubusercontent.com/22488084/46772885-efc94400-cd2c-11e8-81e2-9c488fa20785.png)
   ![image](https://user-images.githubusercontent.com/22488084/46772899-01aae700-cd2d-11e8-96f3-842f65058d31.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Drop the Table.writeToSink() method
> -----------------------------------
>
>                 Key: FLINK-10156
>                 URL: https://issues.apache.org/jira/browse/FLINK-10156
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API &amp; SQL
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>            Priority: Major
>              Labels: pull-request-available
>
> I am proposing to drop the {{Table.writeToSink()}} method.
>  
> *What is the method doing?*
> The {{Table.writeToSink(TableSink)}} method emits a {{Table}} via a {{TableSink}}, for
example to a Kafka topic, a file, or a database.
>  
> *Why should it be removed?*
> The {{writeToSink()}} method was introduced before the Table API supported the {{Table.insertInto(String)}}
method. The {{insertInto()}} method writes a table into a table that was previously registered
with a {{TableSink}} in the catalog. It is the inverse method to the {{scan()}} method and
the equivalent to an {{INSERT INTO ... SELECT}} SQL query.
>  
> I think we should remove {{writeToSink()}} for the following reasons:
> 1. It offers the same functionality as {{insertInto()}}. Removing it would reduce duplicated
API.
> 2. {{writeToSink()}} requires a {{TableSink}} instance. I think TableSinks (and TableSources)
should only be registered with the {{TableEnvironment}} and not be exposed to the "query part"
of the Table API / SQL.
> 3. Registering tables in a catalog and using them for input and output is more aligned
with SQL.
>  



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

Mime
View raw message