Skip to content

Commit

Permalink
[hotfix][python][docs] Fix the example in intro_to_datastream_api
Browse files Browse the repository at this point in the history
  • Loading branch information
dianfu committed Mar 24, 2022
1 parent e6dbeff commit 2837c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down

0 comments on commit 2837c4c

Please sign in to comment.