[
https://issues.apache.org/jira/browse/FLINK-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032111#comment-16032111
]
ASF GitHub Bot commented on FLINK-6746:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/4012#discussion_r119489306
--- Diff: docs/dev/table/common.md ---
@@ -98,374 +89,767 @@ env.execute("Your Query")
</div>
</div>
+**Note:** Table API and SQL queries can be easily integrated with and
embedded into DataStream or DataSet programs. Have a look a the [Integration
with DataStream and DataSet API](#integration-with-datastream-and-dataset-api)
section to learn how DataStreams and DataSets can be converted into Tables and
vice versa.
+
{% top %}
Create a TableEnvironment
-------------------------
-A `Table` is always bound to a specific `TableEnvironment`. It is not
possible to combine Tables of different TableEnvironments.
+The `TableEnvironment` is a central concept of the Table API and SQL
integration. It is responsible for:
+* Registering a `Table` in the internal catalog
+* Registering an external catalog
+* Executing SQL queries
+* Registering a user-defined (scalar, table, or aggregation) function
+* Converting a `DataStream` or `DataSet` into a `Table`
+* Holding a reference to an `ExecutionEnvironment` or
`StreamExecutionEnvironment`
+
+A `Table` is always bound to a specific `TableEnvironment`. It is not
process tables of different TableEnvironments in the same query, e.g., to join
or union them.
+
+A `TableEnvironment` is created by calling the static
`TableEnvironment.getTableEnvironment()` method with a
`StreamExecutionEnvironment` or an `ExecutionEnvironment` and an optional
`TableConfig`. The `TableConfig` can be used to configure the
`TableEnvironment` or to customize the query optimization and translation
process (see [Query Optimization](#query-optimization)).
-**TODO: Extend**
+<div class="codetabs" markdown="1">
+<div data-lang="java" markdown="1">
+{% highlight java %}
+// ***************
+// STREAMING QUERY
+// ***************
--- End diff --
In most of the examples it says that the batch case is equivalent. The
TableEnvironment is one of the few spots where there is an actual difference. I
wanted to highlight that.
> Table API / SQL Docs: Common Page
> ---------------------------------
>
> Key: FLINK-6746
> URL: https://issues.apache.org/jira/browse/FLINK-6746
> Project: Flink
> Issue Type: Sub-task
> Components: Documentation, Table API & SQL
> Affects Versions: 1.3.0
> Reporter: Fabian Hueske
> Assignee: Fabian Hueske
>
> Update and refine ./docs/dev/table/common.md in feature branch
> https://github.com/apache/flink/tree/tableDocs
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)