Wencong Liu created FLINK-31841: ----------------------------------- Summary: 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: 1.18.0 Reporter: Wencong Liu Fix For: 1.18.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)