[ https://issues.apache.org/jira/browse/FLINK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16473497#comment-16473497 ]
ASF GitHub Bot commented on FLINK-9299: --------------------------------------- Github user medcv commented on a diff in the pull request: https://github.com/apache/flink/pull/6000#discussion_r187802397 --- Diff: docs/dev/stream/operators/windows.md --- @@ -730,9 +730,9 @@ input /* ... */ -public class MyProcessWindowFunction implements ProcessWindowFunction<Tuple<String, Long>, String, String, TimeWindow> { +public static class MyProcessWindowFunction extends ProcessWindowFunction<Tuple<String, Long>, String, String, TimeWindow> { --- End diff -- make sense! I see some `static` in this docs for other examples, we might need to make them consistent `private static class MyReduceFunction implements ReduceFunction<SensorReading> {` > ProcessWindowFunction documentation Java examples have errors > ------------------------------------------------------------- > > Key: FLINK-9299 > URL: https://issues.apache.org/jira/browse/FLINK-9299 > Project: Flink > Issue Type: Bug > Components: Documentation > Affects Versions: 1.4.2 > Reporter: Ken Krugler > Assignee: vinoyang > Priority: Minor > > In looking at > [https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/windows.html#processwindowfunction-with-incremental-aggregation], > I noticed a few errors... > * "This allows to incrementally compute windows" should be "This allows it > to incrementally compute windows" > * DataStream<Tuple2<String, Long> input = ...; should be > DataStream<Tuple2<String, Long>> input = ...; > * The getResult() method needs to cast one of the accumulator values to a > double, if that's what it is going to return. > * MyProcessWindowFunction needs to extend, not implement > ProcessWindowFunction > * MyProcessWindowFunction needs to implement a process() method, not an > apply() method. > * The call to .timeWindow takes a Time parameter, not a window assigner. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)