[
https://issues.apache.org/jira/browse/FLINK-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15692636#comment-15692636
]
ASF GitHub Bot commented on FLINK-5023:
---------------------------------------
Github user shixiaogang commented on the issue:
https://github.com/apache/flink/pull/2768
Oh... I added another field to make the code more clear, but I did not
notice the serialization problem. Thanks very much for your reminder.
Your solution does work though the concept of "defaultValue" in folding
states is a little confusing. Another solution to let `FoldingStateDescriptor`
implement its own serialization method. And I prefer this one.
What do you think? @aljoscha
> Add get() method in State interface
> -----------------------------------
>
> Key: FLINK-5023
> URL: https://issues.apache.org/jira/browse/FLINK-5023
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing
> Reporter: Xiaogang Shi
> Assignee: Xiaogang Shi
>
> Currently, the only method provided by the State interface is `clear()`. I
> think we should provide another method called `get()` to return the
> structured value (e.g., value, list, or map) under the current key.
> In fact, the functionality of `get()` has already been implemented in all
> types of states: e.g., `value()` in ValueState and `get()` in ListState. The
> modification to the interface can better abstract these states.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)