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

    https://github.com/apache/flink/pull/4145#discussion_r123139456
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/AbstractKeyedCEPPatternOperator.java
 ---
    @@ -126,6 +129,7 @@ public AbstractKeyedCEPPatternOperator(
                this.isProcessingTime = 
Preconditions.checkNotNull(isProcessingTime);
                this.keySerializer = Preconditions.checkNotNull(keySerializer);
                this.nfaFactory = Preconditions.checkNotNull(nfaFactory);
    +           this.conditionRegistry = 
nfaFactory.createNFA().getConditionRegistry();
    --- End diff --
    
    I have tried that, but found it would touch too many codes.  We need to 
change `process` signature to add the `conditionRegistry` parameter, this need 
to change many codes. And we use `NFACompiler.compile` to compile the given 
pattern into a  NFA, but without `conditionRegistry`, that's why I have to put 
`conditionRegistry` in NFA.
    
    This may look a bit wired. But I'm not sure which way is better.


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