[
https://issues.apache.org/jira/browse/FLINK-12622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chesnay Schepler updated FLINK-12622:
-------------------------------------
Summary: Scala process function example doesn't compile (was: The process
function compiles error in MyProcessWindowFunction in windows.md)
> Scala process function example doesn't compile
> ----------------------------------------------
>
> Key: FLINK-12622
> URL: https://issues.apache.org/jira/browse/FLINK-12622
> Project: Flink
> Issue Type: Bug
> Components: API / DataStream, Documentation
> Affects Versions: 1.8.0
> Reporter: chaiyongqiang
> Assignee: 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
(v8.3.4#803005)