Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5688#discussion_r190176842
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/KeyedProcessFunctionWithCleanupState.scala
---
@@ -44,8 +45,20 @@ abstract class KeyedProcessFunctionWithCleanupState[K,
I, O](queryConfig: Stream
protected def registerProcessingCleanupTimer(
ctx: KeyedProcessFunction[K, I, O]#Context,
currentTime: Long): Unit = {
- if (stateCleaningEnabled) {
+ registerCleanupTimer(ctx, currentTime, TimeDomain.PROCESSING_TIME)
+ }
+ protected def registerEventCleanupTimer(
--- End diff --
We implemented state cleanup as processing time because it is easier to
reason about for users and doesn't interfere that much with event-time
processing (it is not possible to distinguish timers yet). However, it also has
a few short comings such as cleared state when recovering a query from a
savepoint (which we don't really encourage at the moment).
Anyway, introducing event-time state cleanup should definitely go into a
separate issue and PR.
---