chaiyongqiang created FLINK-12622:
-------------------------------------
Summary: 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
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)