Hi, I'm using Flink-1.14.4 and failed to load in WindowReaderFunction the state of a stateful trigger attached to a session window. I found that the following data become available in WindowReaderFunction: - the state defined in the ProcessWindowFunction - the registered timers of the stateful trigger attached to the session window - all the elements of the window , but the state of the stateful trigger attached to the session window is not available when using State Processor API. In other words, the following code always returns null when used with session windows:
> ReducingState<Long> state = > context.triggerState(triggerCountDesc); > Long val = state.get(); > On the other hand, the above code snippet returns expected data when used with sliding and tumbling windows. To explain the problem, I made up an example in a similar spirit to o.a.f.state.api.SavepointWindowReaderITCase. Here you can find three test cases each with different types of event-time windows: Session, Sliding, and Tumbling. With sliding and tumbling windows, I can read the state of the trigger attached to the windows in WindowReaderFunction. However, with a session window, I cannot read the state of the trigger in WindowReaderFunction. Is it a bug, or did I miss something? Best, Dongwon
SavepointWindowReaderTestForDifferentWindows.java
Description: Binary data