[ 
https://issues.apache.org/jira/browse/FLINK-5527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828150#comment-15828150
 ] 

ASF GitHub Bot commented on FLINK-5527:
---------------------------------------

Github user NicoK commented on the issue:

    https://github.com/apache/flink/pull/3142
  
    I saw that deprecation but nonetheless the default value is exposed which 
is why a consistent behaviour is needed.
    
    Since the state descriptor says "that is the value if nothing is set", I 
would find it more consistent if that was true for both use cases of "state", 
i.e. inside an operator and as queryable state. It would make things more 
complicated for users if it were only true for the operator use, I guess.
    
    If the default value is not used, however, it is set to `null` internally 
and so `null` is returned anyway only at the penalty of this one check that the 
actual value is `null`


> QueryableState: requesting a non-existing key in MemoryStateBackend or 
> FsStateBackend does not return the default value
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-5527
>                 URL: https://issues.apache.org/jira/browse/FLINK-5527
>             Project: Flink
>          Issue Type: Improvement
>          Components: Queryable State
>    Affects Versions: 1.2.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>
> Querying for a non-existing key for a state that has a default value set 
> currently results in an UnknownKeyOrNamespace exception when the 
> MemoryStateBackend or FsStateBackend is used. It should return the default 
> value instead just like the RocksDBStateBackend.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to