@ PublicEvolving public < ACC , R > SingleOutputStreamOperator < R > aggregate ( AggregateFunction < T , ACC , R > function , TypeInformation < ACC > accumulatorType , TypeInformation < R > resultType ) { checkNotNull ( function , "function" ) ; checkNotNull ( accumulatorType , "accumulatorType" ) ; checkNotNull ( resultType , "resultType" ) ; if ( function instanceof RichFunction ) { throw new UnsupportedOperationException ( "This aggregation function cannot be a RichFunction." ) ; } return aggregate ( function , new PassThroughWindowFunction < K , W , R > ( ) , accumulatorType , resultType ) ; }
Applies the given aggregation function to each window . The aggregation function is called for each element aggregating values incrementally and keeping the state to one accumulator per key and window .