You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Fabian Hueske (JIRA)" <ji...@apache.org> on 2018/01/04 22:43:00 UTC
[jira] [Commented] (FLINK-8364) ListState should return empty
iterator rather than null when it has no value
[ 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 [~stefanrichter83@gmail.com] 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)