From c2faa6fe3aca39d9648a7e4b57ef797746c28aa9 Mon Sep 17 00:00:00 2001 From: Aljoscha Krettek Date: Mon, 13 Apr 2015 12:34:51 +0200 Subject: [PATCH] [FLINK-1856][doc] Add notice about implicit TypeInformation --- docs/programming_guide.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/programming_guide.md b/docs/programming_guide.md index d69a303f767eb..8638af2c3e265 100644 --- a/docs/programming_guide.md +++ b/docs/programming_guide.md @@ -87,6 +87,8 @@ public class WordCountExample {
{% highlight scala %} +import org.apache.flink.api.scala._ + object WordCount { def main(args: Array[String]) { @@ -174,6 +176,21 @@ If you want to add Flink to an existing Maven project, add the following entry t {{site.FLINK_VERSION_SHORT }} {% endhighlight %} + +**Important:** When working with the Scala API you must have one of these two imports: +{% highlight scala %} +import org.apache.flink.api.scala._ +{% endhighlight %} + +or + +{% highlight scala %} +import org.apache.flink.api.scala.createTypeInformation +{% endhighlight %} + +The reason is that Flink analyzes the types that are used in a program and generates serializers +and comparaters for them. By having either of those imports you enable an implicit conversion +that creates the type information for Flink operations.