[ 
https://issues.apache.org/jira/browse/FLINK-31841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Weijie Guo updated FLINK-31841:
-------------------------------
    Fix Version/s: 2.1.0
                       (was: 2.0.0)

> Redundant local variables in AllWindowedStream#reduce
> -----------------------------------------------------
>
>                 Key: FLINK-31841
>                 URL: https://issues.apache.org/jira/browse/FLINK-31841
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / DataStream
>    Affects Versions: 2.1.0
>            Reporter: Wencong Liu
>            Assignee: Wencong Liu
>            Priority: Major
>              Labels: pull-request-available, stale-assigned
>             Fix For: 2.1.0
>
>
> Currently, there is two redundant local variables in AllWindowedStream#reduce.
> {code:java}
> public SingleOutputStreamOperator<T> reduce(ReduceFunction<T> function) {
>     if (function instanceof RichFunction) {
>         throw new UnsupportedOperationException(
>                 "ReduceFunction of reduce can not be a RichFunction. "
>                         + "Please use reduce(ReduceFunction, WindowFunction) 
> instead.");
>     }
>     // clean the closure
>     function = input.getExecutionEnvironment().clean(function);
>     String callLocation = Utils.getCallLocationName();
>     String udfName = "AllWindowedStream." + callLocation;
>     return reduce(function, new PassThroughAllWindowFunction<W, T>());
> } {code}
> `callLocation` and `udfName` are not used.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to