You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Wencong Liu (Jira)" <ji...@apache.org> on 2023/04/18 12:00:04 UTC
[jira] [Created] (FLINK-31841) Redundant local variables in AllWindowedStream#reduce
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)