flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] sunjincheng121 commented on a change in pull request #7196: [FLINK-10974] [table] Add support for flatMap to table API
Date Fri, 19 Apr 2019 07:47:16 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message