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:04:35 UTC
[flink] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 2837c4c [hotfix][python][docs] Fix the example in intro_to_datastream_api
2837c4c is described below
commit 2837c4c931cc330e8e94ae692c926017eb67402d
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 4605c8b..5674e6e 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 ffa71f6..22bec5c 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/'