[
https://issues.apache.org/jira/browse/FLINK-16367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
godfrey he updated FLINK-16367:
-------------------------------
Description:
As we deprecates {{execute}} method and {{explain}} method because of buffering
SQLs/Tables execution problem. This issue aims to introduce a new method named
createDmlBatch to support executing and explaining the batching queries.
{code:java}
interface TableEnvironment {
/**
* Create a DmlBatch instance which can add dml statements or Tables to the
batch,
* the planner can optimize all added statements and Tables together for
better performance.
*/
DmlBatch createDmlBatch();
}
interface DmlBatch {
/**
* add insert statement to the batch.
*/
void addInsert(String insert);
/**
* add Table with the given sink table name to the batch.
*/
void addInsert(String targetPath, Table table);
/**
* execute all statements and Tables as a batch.
*
* The added statements and Tables will be cleared when this method.
*/
ResultTable execute() throws Exception;
/**
* returns the AST and the execution plan to compute the result of the all
statements and Tables.
*
* @param extended if the plan should contain additional properties. e.g.
estimated cost, traits
*/
String explain(boolean extended);
}
{code}
was:
As we deprecates {{execute}} method and {{explain}} method because of buffering
SQLs/Tables execution problem. This issue aims to introduce a new method named
createDmlBatch to support executing and explaining the batching queries.
The method looks like:
{code:java}
interface TableEnvironment {
/**
* Create a DmlBatch instance which can add dml statements or Tables to the
batch,
* the planner can optimize all added statements and Tables together for
better performance.
*/
DmlBatch createDmlBatch();
}
interface DmlBatch {
/**
* add insert statement to the batch.
*/
void addInsert(String insert);
/**
* add Table with the given sink table name to the batch.
*/
void addInsert(String targetPath, Table table);
/**
* execute all statements and Tables as a batch.
*
* The added statements and Tables will be cleared when this method.
*/
ResultTable execute() throws Exception;
/**
* returns the AST and the execution plan to compute the result of the all
statements and Tables.
*
* @param extended if the plan should contain additional properties. e.g.
estimated cost, traits
*/
String explain(boolean extended);
}
{code}
> Introduce createDmlBatch method in TableEnvironment
> ----------------------------------------------------
>
> Key: FLINK-16367
> URL: https://issues.apache.org/jira/browse/FLINK-16367
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: godfrey he
> Priority: Major
> Fix For: 1.11.0
>
>
> As we deprecates {{execute}} method and {{explain}} method because of
> buffering SQLs/Tables execution problem. This issue aims to introduce a new
> method named createDmlBatch to support executing and explaining the batching
> queries.
> {code:java}
> interface TableEnvironment {
> /**
> * Create a DmlBatch instance which can add dml statements or Tables to the
> batch,
> * the planner can optimize all added statements and Tables together for
> better performance.
> */
> DmlBatch createDmlBatch();
> }
> interface DmlBatch {
> /**
> * add insert statement to the batch.
> */
> void addInsert(String insert);
> /**
> * add Table with the given sink table name to the batch.
> */
> void addInsert(String targetPath, Table table);
> /**
> * execute all statements and Tables as a batch.
> *
> * The added statements and Tables will be cleared when this method.
> */
> ResultTable execute() throws Exception;
>
> /**
> * returns the AST and the execution plan to compute the result of the all
> statements and Tables.
> *
> * @param extended if the plan should contain additional properties. e.g.
> estimated cost, traits
> */
> String explain(boolean extended);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)