I am using Flink CEP to recognize some event patterns, the query looks like
select * from $TABLE MATCH_RECOGNIZE( partition by $PARTITION_FIELDS