I have looked at the moving average and outlier examples and want to make sure I am understanding the code correctly.
My concern is “How do you save state for UDFs when there is a group by in the initial stream”
If i’m reading this correctly, This is saying there is a state per group getting saved and its adding new “states” for an unseen group.
if point.group not in self._state:
self._state[point.group] = AvgHandler.state(self._size)
avg = self._state[point.group].update(value)
Then in snapshot / restore we iterate through each one.
Am Interpretting this correctly?