sunjincheng121 commented on a change in pull request #7196: [FLINK-10974] 
[table] Add support for flatMap to table API
URL: https://github.com/apache/flink/pull/7196#discussion_r276923999
 
 

 ##########
 File path: docs/dev/table/tableApi.md
 ##########
 @@ -1842,11 +1843,27 @@ ScalarFunction func = new MyMapFunction();
 tableEnv.registerFunction("func", func);
 
 Table table = input
-  .map(func("c")).as("a, b")
+  .map("func(c)").as("a, b")
 {% endhighlight %}
       </td>
     </tr>
 
+    <tr>
+      <td>
+        <strong>FlatMap</strong><br>
+        <span class="label label-primary">Batch</span> <span class="label 
label-primary">Streaming</span>
+      </td>
+      <td>
+        <p>Performs a flatMap operation with a table function.</p>
+{% highlight java %}
+TableFunction func = new MyFlatMapFunction();
+tableEnv.registerFunction("func", func);
 
 Review comment:
   I think is better to add the `MyFlatMapFunction()` definition. So that user 
can clearly know why we can `as("a, b")`. What do you think? If so, please 
improve the map example as well.

----------------------------------------------------------------
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

Reply via email to