Fanoid commented on code in PR #191:
URL: https://github.com/apache/flink-ml/pull/191#discussion_r1050339527
##########
flink-ml-core/src/main/java/org/apache/flink/ml/common/datastream/DataStreamUtils.java:
##########
@@ -133,6 +135,15 @@ public static <T> DataStream<T> reduce(DataStream<T>
input, ReduceFunction<T> fu
}
}
+ public static <T, K> DataStream<T> reduce(KeyedStream<T, K> input,
ReduceFunction<T> func) {
Review Comment:
Actually, `KeyedStream.reduce(...)` cannot produce the expected results. It
outputs a reduced result for **every** input element, see
[StreamGroupedReduceOperator](https://github.com/apache/flink/blob/99c2a415e9eeefafacf70762b6f54070f7911ceb/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamGroupedReduceOperator.java#L57).
I'll check whether `BatchGroupedReduceOperator` works in streaming mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]