flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Mushketyk (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-3318) Add support for quantifiers to CEP's pattern API
Date Wed, 03 Aug 2016 06:45:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15405429#comment-15405429
] 

Ivan Mushketyk edited comment on FLINK-3318 at 8/3/16 6:44 AM:
---------------------------------------------------------------

Hi,

Do you mean something like this:

{code:java}
Pattern.begin("start")
  .oneOrMore(where(...).subtype(SubEvent.class)) // + operator
  .followedBy("next").optional(where(...).subtype(...)) // ? operator
  .next("end").count(1, 3).(where(...)) // count bounds operator
{code}

If no one is working on this and you like the idea, I can give it a try.


was (Author: ivan.mushketyk):
Hi,

Do you mean something like this:

Pattern.begin("start")
  .oneOrMore(where(...).subtype(SubEvent.class)) // + operator
  .followedBy("next").optional(where(...).subtype(...)) // ? operator
  .next("end").count(1, 3).(where(...)) // count bounds operator

If no one is working on this and you like the idea, I can give it a try.

> Add support for quantifiers to CEP's pattern API
> ------------------------------------------------
>
>                 Key: FLINK-3318
>                 URL: https://issues.apache.org/jira/browse/FLINK-3318
>             Project: Flink
>          Issue Type: Improvement
>          Components: CEP
>    Affects Versions: 1.0.0
>            Reporter: Till Rohrmann
>            Priority: Minor
>
> It would be a good addition to extend the pattern API to support quantifiers known from
regular expressions (e.g. Kleene star, ?, +, or count bounds). This would considerably enrich
the set of supported patterns.
> Implementing the count bounds could be done by unrolling the pattern state. In order
to support the Kleene star operator, the {{NFACompiler}} has to be extended to insert epsilon-transition
between a Kleene start state and the succeeding pattern state. In order to support {{?}},
one could insert two paths from the preceding state, one which accepts the event and another
which directly goes into the next pattern state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message