Description
This is not a real bug but it causes some weird behaviour, at least in my opinion.
The TimeWindows has a method called windowsFor() that uses and returns an HashMap:
@Override
public Map<Long, TimeWindow> windowsFor(final long timestamp) {
long windowStart = (Math.max(0, timestamp - sizeMs + advanceMs) / advanceMs) * advanceMs;
final Map<Long, TimeWindow> windows = new HashMap<>();
....
the HashMap does not preserve the order of insertion and this ends up later in calls to any streams windowed aggregation functions that are not ordered by window time as I would expect.
A simple solution is to replace the HashMap with a LinkedHashMap and that's what I did.
Anyway replacing it directly in your code can save hours of debugging to understand what's happening.
Thank you
Attachments
Attachments
Issue Links
- links to