godfreyhe commented on a change in pull request #9362: [FLINK-13354] [docs] Add
documentation for how to use blink planner
URL: https://github.com/apache/flink/pull/9362#discussion_r314574952
##########
File path: docs/dev/table/common.md
##########
@@ -768,11 +852,37 @@ A Table API or SQL query is translated when:
Once translated, a Table API or SQL query is handled like a regular DataStream
or DataSet program and is executed when `StreamExecutionEnvironment.execute()`
or `ExecutionEnvironment.execute()` is called.
+</div>
+
+<div data-lang="Blink planner" markdown="1">
+Table API and SQL queries are translated into [DataStream]({{ site.baseurl
}}/dev/datastream_api.html) programs whether their input is streaming or batch.
A query is internally represented as a logical query plan and is translated in
two phases:
+
+1. Optimization of the logical plan,
+2. Translation into a DataStream program.
+
+The behavior of translating a query is different for `TableEnvironment` and
`StreamTableEnvironment`.
+
+For `TableEnvironment`, A Table API or SQL query is translated when
`TableEnvironment.execute()` is called, because `TableEnvironment` will
optimize multiple-sinks into one DAG.
+
+while for `StreamTableEnvironment`, A Table API or SQL query is translated
when:
+
+* a `Table` is emitted to a `TableSink`, i.e., when `Table.insertInto()` is
called.
+* a SQL update query is specified, i.e., when `TableEnvironment.sqlUpdate()`
is called.
+* a `Table` is converted into a `DataStream`.
+
+Once translated, a Table API or SQL query is handled like a regular DataStream
program and is executed when `TableEnvironment.execute()` or
`StreamExecutionEnvironment.execute()` is called.
+
+</div>
+</div>
+
{% top %}
Integration with DataStream and DataSet API
-------------------------------------------
+Both Flink and Blink streaming jobs can integrate with the `DataStream` API.
Only Flink batch job can integrate with the `DataSet API`, Blink batch job
could not be combined with both.
Review comment:
will update as `old planner and Blink planner`
----------------------------------------------------------------
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