Hi,

I am trying to understand how does the SideInputHandler work. It seems that
the SideInputHandler#addSideInputValue method overwrites the ValueStates of
all windows associated with the input WindowedValue (i.e., discards any
existing side input states) :

https://github.com/apache/beam/blob/master/runners/core-java/src/main/java/org/apache/beam/runners/core/SideInputHandler.java#L156

Does it mean that I need to first retrieve existing side input states
(SideInputHandler#get),  and then merge the state with the newly arrived
one before calling SideInputHandler#addSideInputValue?

What if the newly arrived WindowedValue associates with multiple windows?
Should I first extract those windows and then invoke the addSideInputValue
method multiple times?

Thanks,

Shen

Reply via email to