aljoscha commented on a change in pull request #13509:
URL: https://github.com/apache/flink/pull/13509#discussion_r497324935



##########
File path: 
flink-examples/flink-examples-streaming/src/main/scala/org/apache/flink/streaming/scala/examples/ml/IncrementalLearningSkeleton.scala
##########
@@ -62,19 +60,18 @@ object IncrementalLearningSkeleton {
 
     // set up the execution environment
     val env = StreamExecutionEnvironment.getExecutionEnvironment
-    env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)
 
     // build new model on every second of new data
-    val trainingData: DataStream[Int] = env.addSource(new 
FiniteTrainingDataSource)
-    val newData: DataStream[Int] = env.addSource(new FiniteNewDataSource)
+    val trainingData: DataStream[Integer] = env.addSource(new 
FiniteTrainingDataSource)

Review comment:
       The reason is that the explicit window assigners are usually a 
`WindowAssigner<Object, TimeWindow>`. This doesn't work for Scala `Int`, 
`Long`, etc. because they don't extend from `Object` but from `AnyVal`, so the 
Scala compiler will not allow it. It's not pretty, but I think the example is 
pretty artificial and in any real-world use case we would never have a 
`DataStream` of primitives.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to