You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/06 05:45:07 UTC

[GitHub] [flink] dianfu commented on a change in pull request #13070: [FLINK-18831][docs][python] Improve the documentation about the operations in Python Table API

dianfu commented on a change in pull request #13070:
URL: https://github.com/apache/flink/pull/13070#discussion_r466159475



##########
File path: docs/dev/table/tableApi.md
##########
@@ -1490,8 +1558,12 @@ result = left.join(right).where("a = d && rowtime1 >= rowtime2 - 1.second
         <p>Joins a table with the results of a table function. Each row of the left (outer) table is joined with all rows produced by the corresponding call of the table function. A row of the left (outer) table is dropped, if its table function call returns an empty result.
         </p>
 {% highlight python %}
-# register Java User-Defined Table Function
-table_env.register_java_function("split", "com.my.udf.MySplitUDTF")
+# register User-Defined Table Function
+@udtf(input_types=[DataTypes.BIGINT()],
+      result_types=[DataTypes.BIGINT(), DataTypes.BIGINT(), DataTypes.BIGINT()])
+def split(x):
+    return [Row(1, 2, 3)]

Review comment:
       array also works




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