[ 
https://issues.apache.org/jira/browse/FLINK-9985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563371#comment-16563371
 ] 

ASF GitHub Bot commented on FLINK-9985:
---------------------------------------

zentol closed pull request #6457: [FLINK-9985] Incorrect parameter order in 
document
URL: https://github.com/apache/flink/pull/6457
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/dev/stream/operators/windows.md 
b/docs/dev/stream/operators/windows.md
index f657c80379d..e5ec0091e07 100644
--- a/docs/dev/stream/operators/windows.md
+++ b/docs/dev/stream/operators/windows.md
@@ -969,7 +969,7 @@ private static class MyFoldFunction
 
   public Tuple3<String, Long, Integer> fold(Tuple3<String, Long, Integer> acc, 
SensorReading s) {
       Integer cur = acc.getField(2);
-      acc.setField(2, cur + 1);
+      acc.setField(cur + 1, 2);
       return acc;
   }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Incorrect parameter order in document
> -------------------------------------
>
>                 Key: FLINK-9985
>                 URL: https://issues.apache.org/jira/browse/FLINK-9985
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.5.1
>            Reporter: zhangminglei
>            Assignee: zhangminglei
>            Priority: Major
>              Labels: pull-request-available
>
> https://ci.apache.org/projects/flink/flink-docs-release-1.5/dev/stream/operators/windows.html#incremental-window-aggregation-with-foldfunction
> {code:java}
> public Tuple3<String, Long, Integer> fold(Tuple3<String, Long, Integer> acc, 
> SensorReading s) {
>       Integer cur = acc.getField(2);
>       acc.setField(2, cur + 1); // incorrect parameter order , it should be 
> acc.setField(cur + 1, 2)
>       return acc;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to