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

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

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

    https://github.com/apache/flink/pull/4318#discussion_r129289506
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/compiler/NFACompiler.java
 ---
    @@ -697,15 +701,19 @@ private boolean isPatternOptional(Pattern<T, ?> 
pattern) {
                 *
                 * @param condition the condition to extend
                 * @param untilCondition the until condition to join with the 
given condition
    +            * @param isTakeCondition whether the {@code condition} is for 
{@code TAKE} edge
                 * @return condition with AND applied or the original condition
                 */
                private IterativeCondition<T> extendWithUntilCondition(
                                IterativeCondition<T> condition,
    -                           IterativeCondition<T> untilCondition) {
    +                           IterativeCondition<T> untilCondition,
    +                           boolean isTakeCondition) {
                        if (untilCondition != null && condition != null) {
                                return new AndCondition<>(new 
NotCondition<>(untilCondition), condition);
                        } else if (untilCondition != null) {
    -                           return new NotCondition<>(untilCondition);
    +                           if (isTakeCondition) {
    --- End diff --
    
    This condition could be added to `else if`.


> Fix until condition when the contiguity is strict
> -------------------------------------------------
>
>                 Key: FLINK-7170
>                 URL: https://issues.apache.org/jira/browse/FLINK-7170
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>            Reporter: Dian Fu
>            Assignee: Dian Fu
>
> When the contiguity is {{STRICT}}, the method {{extendWithUntilCondition}} is 
> not correct.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to