You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2022/03/24 09:07:06 UTC
[flink] branch release-1.13 updated: [hotfix][python][docs] Fix the example in intro_to_datastream_api
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.13 by this push:
new ee17a23 [hotfix][python][docs] Fix the example in intro_to_datastream_api
ee17a23 is described below
commit ee17a234fcd53d447cdb277c5ce9e878f256f90e
Author: Dian Fu <di...@apache.org>
AuthorDate: Thu Mar 24 17:02:38 2022 +0800
[hotfix][python][docs] Fix the example in intro_to_datastream_api
---
docs/content.zh/docs/dev/python/datastream/intro_to_datastream_api.md | 2 +-
docs/content/docs/dev/python/datastream/intro_to_datastream_api.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/content.zh/docs/dev/python/datastream/intro_to_datastream_api.md b/docs/content.zh/docs/dev/python/datastream/intro_to_datastream_api.md
index 85f70a8..e838097 100644
--- a/docs/content.zh/docs/dev/python/datastream/intro_to_datastream_api.md
+++ b/docs/content.zh/docs/dev/python/datastream/intro_to_datastream_api.md
@@ -78,7 +78,7 @@ def state_access_demo():
# 3. define the execution logic
ds = ds.map(lambda a: Row(a % 4, 1), output_type=Types.ROW([Types.LONG(), Types.LONG()])) \
.key_by(lambda a: a[0]) \
- .map(MyMapFunction(), output_type=Types.ROW([Types.LONG(), Types.LONG()]))
+ .map(MyMapFunction(), output_type=Types.TUPLE([Types.LONG(), Types.LONG()]))
# 4. create sink and emit result to sink
output_path = '/opt/output/'
diff --git a/docs/content/docs/dev/python/datastream/intro_to_datastream_api.md b/docs/content/docs/dev/python/datastream/intro_to_datastream_api.md
index 1a1254df..bf1398a 100644
--- a/docs/content/docs/dev/python/datastream/intro_to_datastream_api.md
+++ b/docs/content/docs/dev/python/datastream/intro_to_datastream_api.md
@@ -78,7 +78,7 @@ def state_access_demo():
# 3. define the execution logic
ds = ds.map(lambda a: Row(a % 4, 1), output_type=Types.ROW([Types.LONG(), Types.LONG()])) \
.key_by(lambda a: a[0]) \
- .map(MyMapFunction(), output_type=Types.ROW([Types.LONG(), Types.LONG()]))
+ .map(MyMapFunction(), output_type=Types.TUPLE([Types.LONG(), Types.LONG()]))
# 4. create sink and emit result to sink
output_path = '/opt/output/'