One of the main features of CEP is the ability to detect patterns of events directly on a stream, even complex conditions such as sequences, alternations, and non-events (missing events). For example, detect if a particular event is followed by another event within some time period. This feature is generally called pattern matching.
In CQL, pattern matching is realized through the
MATCH_RECOGNIZE operator. Being a streaming-processing related feature,
MATCH_RECOGNIZE is a stream-to-stream operator, meaning that it applies directly to a stream, without the need to convert it to a relation using a Window operator as you have done in the past for some of the other features like joins.
Let's take a look at the basic skeleton for