[ https://issues.apache.org/jira/browse/FLINK-12622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848003#comment-16848003 ]
chaiyongqiang commented on FLINK-12622: --------------------------------------- [https://github.com/apache/flink/pull/8540/commits] > The process function compiles error in MyProcessWindowFunction in windows.md > ---------------------------------------------------------------------------- > > Key: FLINK-12622 > URL: https://issues.apache.org/jira/browse/FLINK-12622 > Project: Flink > Issue Type: Bug > Components: Documentation > Affects Versions: 1.8.0 > Reporter: chaiyongqiang > Priority: Minor > > The process function defined as below in windows.md : > {quote}class MyProcessWindowFunction extends ProcessWindowFunction[(String, > Long), String, String, TimeWindow] { > def process(key: String, context: Context, input: Iterable[(String, Long)], > out: Collector[String]): () = { > var count = 0L > for (in <- input) { > count = count + 1 > } > out.collect(s"Window ${context.window} count: $count") > } > }{quote} > The process function defined in ProcessWindowFunction has a return vlue of > Unit , But the override in MyProcessWindowFunction doesn't match it well. > When compiling MyProcessWindowFunction , it comes an error like the following > : > {quote}Error:(37, 109) '=>' expected but '=' found. > def process(key: String, context: Context, input: Iterable[(String, Long)], > out: Collector[String]) : () = {{quote} -- This message was sent by Atlassian JIRA (v7.6.3#76005)