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

    https://github.com/apache/flink/pull/3624#discussion_r108369790
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ---
    @@ -553,9 +559,38 @@ private int calculateIncreasingSelfState(int 
ignoreBranches, int takeBranches) {
                return outgoingEdges;
        }
     
    +   private boolean checkFilterCondition(ComputationState<T> 
computationState, IterativeCondition<T> condition, T event) throws Exception {
    +           return condition == null || condition.filter(event, 
computationState.getConditionContext());
    +   }
    +
    +   Map<String, List<T>> extractCurrentMatches(final ComputationState<T> 
computationState) {
    +           if (computationState.getPreviousState() == null) {
    +                   return new HashMap<>();
    +           }
    +
    +           Collection<LinkedHashMultimap<String, T>> paths = 
stringSharedBuffer.extractPatterns(
    +                           computationState.getPreviousState().getName(),
    +                           computationState.getEvent(),
    +                           computationState.getTimestamp(),
    +                           computationState.getVersion());
     
    -   private boolean checkFilterCondition(FilterFunction<T> condition, T 
event) throws Exception {
    -           return condition == null || condition.filter(event);
    +           // for a given computation state, we cannot have more than one 
matching patterns.
    +           Preconditions.checkArgument(paths.size() <= 1);
    --- End diff --
    
    Fixing this


---
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.
---

Reply via email to