You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by tbud <te...@gmail.com> on 2021/04/20 22:02:14 UTC

Contiguity in SQL vs CEP

There's 3 different types of Contiguity defined in the CEP documentation [1] 
looping + non-looping -- Strict, relaxed and non deterministic relaxed.
There's no equivalent in the SQL documentation [2]. Can someone shed some
light on what's achievable in SQL and what isn't ?
Related question : It seems as if SQL default if I define a pattern such as
(A B+ C) is the relaxed mode. if this is true then when keeping state using
sql are the non-matching events dropped from the state ?


[1] 
https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/cep.html#combining-patterns
<https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/cep.html#combining-patterns>  
[2]
https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/streaming/match_recognize.html#defining-a-pattern



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

Re: Contiguity in SQL vs CEP

Posted by tbud <te...@gmail.com>.
Hi,
In that case what's the difference between reluctant quantifier like (B*?)
in SQL and relaxed contiguity in CEP ?



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

Re: Contiguity in SQL vs CEP

Posted by Dawid Wysakowicz <dw...@apache.org>.
Hi,

MATCH_RECOGNIZE clause in SQL standard does not support different
contiguities. The MATCH_RECOGNIZE always uses the strict contiguity.

Best,

Dawid

On 21/04/2021 00:02, tbud wrote:
> There's 3 different types of Contiguity defined in the CEP documentation [1] 
> looping + non-looping -- Strict, relaxed and non deterministic relaxed.
> There's no equivalent in the SQL documentation [2]. Can someone shed some
> light on what's achievable in SQL and what isn't ?
> Related question : It seems as if SQL default if I define a pattern such as
> (A B+ C) is the relaxed mode. if this is true then when keeping state using
> sql are the non-matching events dropped from the state ?
>
>
> [1] 
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/cep.html#combining-patterns
> <https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/cep.html#combining-patterns>  
> [2]
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/streaming/match_recognize.html#defining-a-pattern
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/