Github user aljoscha commented on the issue: https://github.com/apache/flink/pull/5295 Yes, that was me. ð It was just a quick idea, and it would work because both `withGap()` and `withGapExtractor()` are static so the latter could have `T` on the method signature and return a `DynamicEventTimeSessionWindows` (or some such). I'm not against keeping it in the separate class, though. I agree that the cast is a bit wonky but we know that it always works because the trigger we return never looks at the element.
---