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

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

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

    https://github.com/apache/flink/pull/3390#discussion_r103405219
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ---
    @@ -254,7 +255,18 @@ public int hashCode() {
                                                                
states.push(stateTransition.getTargetState());
                                                                break;
                                                        case IGNORE:
    -                                                           
resultingComputationStates.add(computationState);
    +                                                           final 
DeweyNumber version;
    +                                                           if (branched) {
    --- End diff --
    
    Here we assume that the `IGNORE` is going to be processed after the `TAKE`. 
This is true because of the way the `NFACompiler` creates the pattern graph, 
but different implementations may change in the future so we should somehow 
impose this ordering. It could be by sorting the `stateTransitions`  list in 
the `State` class, or by sorting them just before processing them in the 
`NFA::computeNextStates()`.


> CEP: fix duplicate output patterns problem.
> -------------------------------------------
>
>                 Key: FLINK-5864
>                 URL: https://issues.apache.org/jira/browse/FLINK-5864
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.3.0
>            Reporter: Kostas Kloudas
>            Assignee: Dawid Wysakowicz
>             Fix For: 1.3.0
>
>
> Currently when searching for a pattern {{a,b,c}} and we have input elements 
> {{a -> b1 -> b2 ->c}} where {{b1}} and {{b2}} are both valid elements for the 
> position b, then instead of having an output of 2 matched patterns: {{a, b1, 
> c}} and {{a, b2, c}}, we have 4, with 2 copies of each valid pattern.
> The problem is with the creation of Dewey number, cause it is not increased 
> on graph branching.
>       



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

Reply via email to