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

ASF GitHub Bot commented on FLINK-6208:
---------------------------------------

Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3698#discussion_r113663695
  
    --- Diff: 
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAITCase.java 
---
    @@ -1609,7 +1549,7 @@ public boolean filter(Event value) throws Exception {
     
                compareMaps(resultingPatterns, Lists.<List<Event>>newArrayList(
                                Lists.newArrayList(ConsecutiveData.startEvent, 
ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent2, 
ConsecutiveData.end),
    -                           Lists.newArrayList(ConsecutiveData.startEvent, 
ConsecutiveData.middleEvent2, ConsecutiveData.middleEvent3, ConsecutiveData.end)
    +                           Lists.newArrayList(ConsecutiveData.startEvent, 
ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent3, ConsecutiveData.end)
    --- End diff --
    
    Here the expected result should only be the first pattern, because we are 
in `consecutive` mode.
    The problem  is the 
    
    ```
    if (quantifier.hasProperty(Quantifier.QuantifierProperty.CONSECUTIVE) &&
        !quantifier.hasProperty(Quantifier.QuantifierProperty.EAGER)) {
                        //inner branching and no invalid elements in between
                        return (IterativeCondition<T>) pattern.getCondition();
    ```
    in the `getInnerIgnoreCondition()` of the `NFACompiler`.


> Implement skip till next match strategy
> ---------------------------------------
>
>                 Key: FLINK-6208
>                 URL: https://issues.apache.org/jira/browse/FLINK-6208
>             Project: Flink
>          Issue Type: New Feature
>          Components: CEP
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>             Fix For: 1.3.0
>
>
> Right now, we support two strategies (except for looping states):
> * skip till any match -> {{followedBy}}
> * strict contiguity -> {{next}}
> We should also support a strategy that will match only the first occurence of 
> a valid pattern.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to