godfreyhe commented on a change in pull request #8984:
[FLINK-13088][table-api] Support lazy query transformation & execution on
TableEnvironment
URL: https://github.com/apache/flink/pull/8984#discussion_r300400762
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -337,6 +362,47 @@ public TableConfig getConfig() {
return tableConfig;
}
+ @Override
+ public JobExecutionResult execute(String jobName) throws Exception {
+ translate(bufferedModifyOperations);
+ return execEnv.execute(jobName);
Review comment:
`bufferedModifyOperations` must be cleared here, otherwise the
`bufferedModifyOperations` will be translated again and again if table env is
used for multiple job.
e.g.
val tableEnv = // shouldTranslateEagerly is false
tableEnv.sqlUpdate("insert into table1 select ...");
tableEnv.execute("job1")
tableEnv.sqlUpdate("insert into table2 select ...");
tableEnv.execute("job2")
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services