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

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

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

    https://github.com/apache/flink/pull/4963#discussion_r159582105
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultOperatorStateBackend.java
 ---
    @@ -497,6 +497,15 @@ public String toString() {
     
                        return partitionOffsets;
                }
    +
    +           @Override
    +           public void update(List<S> values) throws Exception {
    +                   internalList.clear();
    +
    +                   if (values != null && !values.isEmpty()) {
    --- End diff --
    
    it makes a difference as we chatted about empty list case


> support update() in ListState
> -----------------------------
>
>                 Key: FLINK-7475
>                 URL: https://issues.apache.org/jira/browse/FLINK-7475
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core, DataStream API, State Backends, Checkpointing
>    Affects Versions: 1.4.0
>            Reporter: yf
>            Assignee: Bowen Li
>             Fix For: 1.5.0
>
>
> If I want to update the list. 
> I have to do two steps: 
> listState.clear() 
> for (Element e : myList) { 
>     listState.add(e); 
> } 
> Why not I update the state by: 
> listState.update(myList) ?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to