[ 
https://issues.apache.org/jira/browse/FLINK-16361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

godfrey he updated FLINK-16361:
-------------------------------
    Summary: FLIP-84: Improve & Refactor API of TableEnvironment & Table  (was: 
FLIP-84: Improve & Refactor API of TableEnvironment)

> FLIP-84: Improve & Refactor API of TableEnvironment & Table
> -----------------------------------------------------------
>
>                 Key: FLINK-16361
>                 URL: https://issues.apache.org/jira/browse/FLINK-16361
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: godfrey he
>            Assignee: godfrey he
>            Priority: Major
>             Fix For: 1.11.0
>
>
> as the 
> [FLIP-84|https://cwiki.apache.org/confluence/display/FLINK/FLIP-84%3A+Improve+%26+Refactor+API+of+TableEnvironment]
>  document described, 
> We propose to deprecate the following methods in TableEnvironment:
> {code:java}
> void sqlUpdate(String sql)
> void insertInto(String targetPath, Table table)
> void execute(String jobName)
> String explain(boolean extended)
> Table fromTableSource(TableSource<?> source)
> {code}
> meanwhile, we propose to introduce the following new methods in 
> TableEnvironment:
> {code:java}
> // synchronously execute the given single statement immediately, and return 
> the execution result.
> ResultTable executeStatement(String statement) 
> public interface ResultTable {
>     TableSchema getResultSchema();
>     Iterable<Row> getResultRows();
> }
> // create a DmlBatch instance which can add dml statements or Tables to the 
> batch and explain or execute them as a batch.
> DmlBatch createDmlBatch()
> interface DmlBatch {
>     void addInsert(String insert);
>     void addInsert(String targetPath, Table table);
>     ResultTable execute() throws Exception ;
>     String explain(boolean extended);
> }
> {code}
> We unify the Flink table program trigger behavior, and propose that: for 
> {{TableEnvironment}} and {{StreamTableEnvironment}}, you must use 
> {{TableEnvironment.execute()}} to trigger table program execution, once you 
> convert the table program to a {{DataStream}} program (through 
> {{toAppendStream}} or {{toRetractStream}} method), you must use 
> {{StreamExecutionEnvironment.execute}} to trigger the {{DataStream}} program.



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

Reply via email to