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`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---