[
https://issues.apache.org/jira/browse/FLINK-8364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312142#comment-16312142
]
Fabian Hueske commented on FLINK-8364:
--------------------------------------
Changing the behavior of {{ListState.get()}} might break applications that
assume the current behavior of returning {{null}} if the state is empty.
Also, {{get}} is inherited from {{AppendingState}} for which the JavaDocs
explicitly state
bq. NOTE TO IMPLEMENTERS: if the state is empty, then this method should return
null.
Maybe we should rather add a new method like {{getIterator()}} instead of
changing {{get()}}.
> ListState should return empty iterator rather than null when it has no value
> ----------------------------------------------------------------------------
>
> Key: FLINK-8364
> URL: https://issues.apache.org/jira/browse/FLINK-8364
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing
> Affects Versions: 1.4.0
> Reporter: Bowen Li
> Assignee: Bowen Li
> Fix For: 1.5.0
>
>
> per discussion with [[email protected]] in
> https://github.com/apache/flink/pull/4963, we decide to have
> {{ListState#get}} return empty iterator if it has no value in it.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)