Hi Tony,
The reason for this is that the aggregate code is newer. The new code has less 
layers, compared to the reduce/fold implementation where it is 
InternalFunction(ReduceApplyFunction(Reduce)) instead of 
InteralAggregateFunction(Aggregate).

Best,
Aljoscha  
> On 26. Apr 2017, at 06:39, 魏偉哲 <tony19920...@gmail.com> wrote:
> 
> Hi all,
> 
> Recently, I was tracing the source code in streaming api and I was confused
> about some implementations.
> 
> When using reduce function with evictor, the *WindowStream* will wrap the
> *ReduceFunction* and *ProcessWindowFunction* into
> *ReduceApplyProcessWindonwFunction* and put it in
> *InternalIterableProcessWindowFunction*. So does fold function.
> 
> However, when using aggregate, the *InternalIterableProcessWindowFunction*
> was changed to *InternalAggregateProcessWindowFunction* which was applied
> aggregation in the process() method.
> 
> My question is why not implement an *AggregateApplyProcessWindowFunction*
> and use *InternalIterableProcessWindowFunction* instead just like reduce,
> fold function did. Is there any concern?
> 
> Many thanks,
> Tony Wei

Reply via email to