Hi! Currently, there will not be much difference in how the execution behaves (assuming you manually read from the value state, aggregate, and write back). Think of the ReducingState as syntactic sugar.
However, the ReducingState has the potential for performance optimizations (deferred reducing if values are currently not in memory). That is not really exploited at the moment, though. On the other hand, the value state has the advantage that it is a bit more flexible, and you can change the logic easier when upgrading the program. Greetings, Stephan On Thu, Dec 29, 2016 at 10:39 AM, Truong Duc Kien <duckientru...@gmail.com> wrote: > Hi all, > > Since both ReducingState and ValueState store a single value, there are > many use cases where both can be used. > When should we use one instead of the other ? > > Best regards, > Kien >