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

    https://github.com/apache/flink/pull/6173#discussion_r196046444
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java
 ---
    @@ -392,14 +268,14 @@ public KeyGroupRange getKeyGroupRange() {
                        kvStateRegistry.registerKvState(keyGroupRange, name, 
kvState);
                }
     
    -           return state;
    +           return (S) kvState;
    --- End diff --
    
    For the future we should think about a way to bind the state type of the 
state descriptor also to the internal state type, so that the factory can 
produce a proper generic type that reflects matches the state descriptor but 
also is an `InternalKvState`. For now, I see no simple solution, but we might 
want to keep this in mind and discuss with @aljoscha .


---

Reply via email to