Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/936#discussion_r35520767
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/DataStreamTest.scala
 ---
    @@ -332,13 +359,23 @@ class DataStreamTest {
         assert(
           getFunctionForDataStream(map
             .filter((x: Int) => true))
    -        .isInstanceOf[FilterFunction[Int]])
    -
    +        .isInstanceOf[FilterFunction[_]])
    +
    +    val statefulFilter1 = src.filterWithState((in, state: Option[Long]) => 
(true, None))
    +    
assert(getFunctionForDataStream(statefulFilter1).isInstanceOf[FilterFunction[_]])
    +    assert(!getFunctionForDataStream(statefulFilter1).
    +        asInstanceOf[StatefulFunction[_, _, _]].isPartitioned)
    +
    +    val statefulFilter2 = src.keyBy(x=>x).filterWithState(
    +        (in, state: Option[Long]) => (false, None), true)
    +    assert(getFunctionForDataStream(statefulFilter2).
    +        asInstanceOf[StatefulFunction[_, _, _]].isPartitioned)
    +   
    --- End diff --
    
    Maybe we can add an IT test which is stateful and uses the new API 
constructs. This will assure that the values are correctly read from and 
written to the `OperatorState`. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to