...
The left window of in-order records and both windows for out-of-order records need to be updated with the values of records that have already been processed, assuming there are existing records that wall within these windows and that these windows do not already exist. Because each record creates or contributes to one window that includes itself and one window that does not, we have the set of all possible windows stored in our WindowStore. Therefore, when we need to find an aggregation to create a new window, that aggregation is already stored somewhere in the WindowStore. Figure 2 illustrates how we will find the aggregation value for the new left window.
Figure 2
Finding the aggregate for the new right window (for out-of-order records) is similarly predictable, as shown in
Figure 3.
Figure 3
Aggregating for Existing Windows
...