You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by shkob1 <sh...@gmail.com> on 2019/05/15 22:29:29 UTC

Preventing Late events from getting triggered for custom trigger

Im running SQL along with a a custom trigger - so think about this scenario:

Select id, count(*) as count_events, atLeastOneIsTrue(booleanField) as
shouldTrigger
FROM my_table 
GROUP BY id

transforming it to a retracted stream and then filtering by the
shouldTrigger field, that works as expected.

What happens is that if i get any event for the same id past the
shouldTrigger=true condition, obviously it will trigger again (as
atLeastOneIsTrue is still TRUE). I'm trying to prevent it, so similar to
late events on window functions in [1] i want to ensure only a single
trigger happens for any given id.

I had a thought about whether this is related to withIdleStateRetentionTime
but it doesn't seem right to me

Any idea how i can achieve it?

Thanks!
Shahar



[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/stream/operators/windows.html#allowed-lateness




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/