Hi, Alexis.
I think you are right. It also applies for a global window with a custom
trigger.
If you apply a ReduceFunction or AggregateFunction, the window state size
usually is smaller than applying ProcessWindowFunction due to the
aggregated value. It also works for global windows.
Of course, the state size of a global window also depends on how you
implement your trigger.
BTW, we often use TTL to reduce the state size of the global window.
Hope these can help you.


On Sat, Oct 8, 2022 at 4:49 AM Alexis Sarda-Espinosa <
sarda.espin...@gmail.com> wrote:

> Hello,
>
> I found an SO thread that clarifies some details of window state size [1].
> I would just like to confirm that this also applies when using a global
> window with a custom trigger.
>
> The reason I ask is that the TriggerResult API is meant to cover all
> supported scenarios, so FIRE vs FIRE_AND_PURGE is relevant, for example,
> for a ProcessWindowFunction that holds all input records until it fires.
> However, I assume there would be no distinction if I use a
> (Rich)AggregateFunction, regardless of window type (global vs timed), but
> I'd like to be sure.
>
> Regards,
> Alexis.
>
> [1]
> https://stackoverflow.com/questions/55247668/flink-window-state-size-and-state-management
>
>

-- 
Best,
Hangxiang.

Reply via email to