TisonKun commented on a change in pull request #11296: [FLINK-16363] [table] Correct the execution behavior of TableEnvironment and StreamTableEnvironment URL: https://github.com/apache/flink/pull/11296#discussion_r389046469
########## File path: docs/dev/table/common.zh.md ########## @@ -838,17 +843,16 @@ Table API 或者 SQL 查询在下列情况下会被翻译: 1. 优化逻辑执行计划 2. 翻译成 DataStream 程序 -TableEnvironment 和 StreamTableEnvironment 翻译查询的方式不同。 +Table API 或者 SQL 查询在下列情况下会被翻译: -对于 `TableEnvironment`,Table API 和 SQL 查询会在调用 `TableEnvironment.execute()` 时被翻译,因为 `TableEnvironment` 会将多 sink 优化成一张有向无环图。 +* 当 `TableEnvironment.execute()` 被调用时。`Table` (通过 `Table.insertInto()` 输出给 `TableSink`)和 SQL (通过调用 `TableEnvironment.sqlUpdate()`)会先被缓存到 `TableEnvironment` 中。 +* `Table` 被转换成 `DataStream` 时(参阅[与 DataStream 和 DataSet API 结合](#integration-with-datastream-and-dataset-api))。翻译完成后,它就是一个普通的 DataStream 程序对待并且会在调用 `StreamExecutionEnvironment.execute()` 的时候被执行。 Review comment: ```suggestion * `Table` 被转换成 `DataStream` 时(参阅[与 DataStream 和 DataSet API 结合](#integration-with-datastream-and-dataset-api))。转换完成后,它就成为一个普通的 DataStream 程序,并且会在调用 `StreamExecutionEnvironment.execute()` 的时候被执行。 ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services