sunjincheng121 commented on a change in pull request #7409: [FLINK-11064]
[table] Setup a new flink-table module structure
URL: https://github.com/apache/flink/pull/7409#discussion_r248181099
##########
File path: docs/dev/table/index.md
##########
@@ -31,41 +31,75 @@ The Table API and the SQL interfaces are tightly
integrated with each other as w
**Please note that the Table API and SQL are not yet feature complete and are
being actively developed. Not all operations are supported by every combination
of \[Table API, SQL\] and \[stream, batch\] input.**
-Setup
------
+Dependency Structure
+--------------------
-The Table API and SQL are bundled in the `flink-table` Maven artifact.
-The following dependency must be added to your project in order to use the
Table API and SQL:
+All Table API and SQL components are bundled in the `flink-table` Maven
artifact.
+
+The following dependencies are relevant for most projects:
+
+* `flink-table-api-java`: The Table & SQL API for the Java programming
language.
+* `flink-table-api-scala`: The Table & SQL API for the Scala programming
language.
+* `flink-table-planner`: The table program planner and runtime.
+* `flink-table-common`: A common module for extending the table ecosystem by
custom functions, formats, etc.
+
+### Table Program Dependencies
+
+The following dependencies must be added to a project in order to use the
Table API & SQL for defining pipelines:
{% highlight xml %}
<dependency>
<groupId>org.apache.flink</groupId>
- <artifactId>flink-table{{ site.scala_version_suffix }}</artifactId>
- <version>{{site.version }}</version>
+ <artifactId>flink-table-planner{{ site.scala_version_suffix }}</artifactId>
+ <version>{{site.version}}</version>
</dependency>
{% endhighlight %}
-In addition, you need to add a dependency for either Flink's Scala batch or
streaming API. For a batch query you need to add:
+Additionally, depending on the target programming language, you need to add
the Java or Scala API. Please note that adding both APIs to a project could
lead to unintended behavior.
{% highlight xml %}
+<!-- Either... -->
<dependency>
<groupId>org.apache.flink</groupId>
- <artifactId>flink-scala{{ site.scala_version_suffix }}</artifactId>
- <version>{{site.version }}</version>
+ <artifactId>flink-table-api-java{{ site.scala_version_suffix }}</artifactId>
+ <version>{{site.version}}</version>
+</dependency>
+<!-- or... -->
+<dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-table-api-scala{{ site.scala_version_suffix }}</artifactId>
+ <version>{{site.version}}</version>
</dependency>
{% endhighlight %}
-For a streaming query you need to add:
+Internally, parts of the table ecosystem are implemented in Scala. Therefore,
please make sure to add the following dependency for both batch and streaming
applications:
Review comment:
For a batch query you need to add:
```
<dependency>
<groupId>org.apache.flink</groupId>
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala{{ site.scala_version_suffix }}</artifactId>
<artifactId>flink-streaming-scala{{ site.scala_version_suffix }}</artifactId>
<version>{{site.version}}</version>
</dependency>
```
For a streaming query you need to add:
```
<dependency>
<groupId>org.apache.flink</groupId>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala{{ site.scala_version_suffix
}}</artifactId> <artifactId>flink-streaming-scala{{
site.scala_version_suffix }}</artifactId>
<version>{{site.version}}</version>
</dependency>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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