Description
Trying to use a sliding window with time-difference 0 (that is officially supported) fails with an exception and Kafka Stream crashes with
IllegalArgumentException: Window endMs must be greater than window startMs
The underlying issue is the usage of TimeWindow to represent the window what is incorrect.
TimeWindow is designed for hopping/tumbling windows with an inclusive lower and exclusive upper bound. Thus, the upper bound must be larger than the lower bound, because otherwise the window would have a negative size what is not allowed.
For sliding windows, we use include lower and upper bound though, and thus want to set upper and lower bound to be the same, what would still result in a window of size 1 (note that time-difference of 0 results in window size 1).
It seems we need to introduce a new SlidingWindow type.
Note, that for a non-zero time-difference, the window bounds are computed "correctly", however, TimeWindow is still an incorrect representation because it represents `[start,end)` instead of `[start,end]`.
Attachments
Issue Links
- links to