Github user bowenli86 commented on the issue:

    https://github.com/apache/flink/pull/5356
  
     I also agree that changing `get()` API may not be good because it will 
break user's logic.
    
    From a user point of view, I found that receiving `null` from `get()` API 
is a bit inelegant and confusing. As a user, instinctively, I'd expect an empty 
Iterable when there's no state value. In practice, I had to debug several times 
and ended up finding the true semantics of `get()`. This is where 
`iterator()`'s value lies - to help users avoid such cases.
    
    Frankly, the `iterator()` API is not hard to maintain at all. It only 
invokes `get()`, handles the `null` situation, and returns users an empty 
iterable.


---

Reply via email to