When using only the frame clause (and possibly the partition function), subsequent window function evaluations can be done lazily, as they do not necessarily depend on the whole partition(s) being collected in advance.
For instance, when doing a sliding sum like this:
Seq.of(1, 2, 3, 4, 5, 6, 7...)
.window(-1, 1)
.map(w -> w.sum())
.limit(3)
.toList();
The result here is:
[Optional[3], Optional[6], Optional[9]]
There is no need to go beyond item no. 4 (limit + frame upper bound) in collecting the stream.