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

    https://github.com/apache/flink/pull/2768#discussion_r89129366
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/state/State.java ---
    @@ -20,19 +20,30 @@
     
     import org.apache.flink.annotation.PublicEvolving;
     
    +import java.io.IOException;
    +
     /**
      * Interface that different types of partitioned state must implement.
      *
      * <p>The state is only accessible by functions applied on a 
KeyedDataStream. The key is
      * automatically supplied by the system, so the function always sees the 
value mapped to the
      * key of the current element. That way, the system can handle stream and 
state partitioning
      * consistently together.
    + *
    + * @param <T> The type of the values in the state.
      */
     @PublicEvolving
    -public interface State {
    -
    +public interface State<T> {
        /**
    -    * Removes the value mapped under the current key.
    +    * Returns the current value for the state. When the state is not
    +    * partitioned the returned value is the same for all inputs in a given
    +    * operator instance. If state partitioning is applied, the value 
returned
    +    * depends on the current operator input, as the operator maintains an
    +    * independent state for each partition.
    --- End diff --
    
    This is incorrect, we don't maintain state by partition but by key. (This 
is not your fault, it was always like this on `ValueState` and you copied it 
from there, I just discovered it now when reading your code.)


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