lindong28 commented on code in PR #97:
URL: https://github.com/apache/flink-ml/pull/97#discussion_r890966838


##########
flink-ml-core/src/main/java/org/apache/flink/ml/common/datastream/DataStreamUtils.java:
##########
@@ -113,32 +151,44 @@ public static <T> DataStream<T> reduce(DataStream<T> 
input, ReduceFunction<T> fu
             extends AbstractUdfStreamOperator<OUT, MapPartitionFunction<IN, 
OUT>>
             implements OneInputStreamOperator<IN, OUT>, BoundedOneInput {
 
-        private ListState<IN> valuesState;
+        private final TypeInformation<IN> inputType;
 
-        public MapPartitionOperator(MapPartitionFunction<IN, OUT> 
mapPartitionFunc) {
+        private DataCacheListState<IN> dataCacheListState;
+
+        public MapPartitionOperator(
+                MapPartitionFunction<IN, OUT> mapPartitionFunc, 
TypeInformation<IN> inputType) {
             super(mapPartitionFunc);
+            this.inputType = inputType;

Review Comment:
   Instead of passing inputType to create serializer, would it be simpler to 
keep the previous approach and create serializer using the following code?
   
   ```
   getOperatorConfig().getTypeSerializerIn(0, getClass().getClassLoader())
   ```



-- 
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]

Reply via email to