Flink error on using RichAggregateFunction
问题 I am trying to use an implementation of the abstract RichAggregateFunction in Flink. I want it to be "rich" because I need to store some state as part of the aggregator, and I can do this since I have access to the runtime context. My code is something like below: stream.keyBy(...) .window(GlobalWindows.create()) .trigger(...) .aggregate(new MyRichAggregateFunction()); However, I get an UnsupportedOperationException saying This aggregation function cannot be a RichFunction. I'm clearly not