[ https://issues.apache.org/jira/browse/FLINK-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16062403#comment-16062403 ]
ASF GitHub Bot commented on FLINK-6938: --------------------------------------- Github user kl0u commented on the issue: https://github.com/apache/flink/pull/4145 Hi @wuchong ! Nice work! I have some changes to propose in the code itself, but before moving on with this, I have some questions about the need of the change. For the second, I have commented on the JIRA (FLINK-6939) and it would be nice to finish the discussion there first, before checking the following comments. Now for the comments on the code I would suggest the following: 1) Remove the `TransitionInfo` from the `ConditionRegistry` and replace it with the `StateTransition<T>`, as the `TransitionInfo` is just a copy of the state transition. Also make the `ConditionRegistry`, `ConditionRegistry<T>`. 2) Pass the `ConditionRegistry` to the `State` itself in the constructor. This will simplify all the changes of the `addStateTransition()`, `addProceed()`... as they do not need the registry as an additional argument anymore. 3) If we agree to keep the `RichIterativeFunction`, then we should probably think if we can remove the non-rich `IterativeCondition` (although this is optional). For these changes, I have a branch where I tested them a bit but of course feel free to make the code nicer, and also tell me if I did any change that does not seem reasonable to you. This branch was just a fast testing branch on my side. You can find it here: https://github.com/kl0u/flink/tree/cep-iter-pr Again thanks a lot for the work and I am looking forward to you comments! > IterativeCondition should support RichFunction interface > -------------------------------------------------------- > > Key: FLINK-6938 > URL: https://issues.apache.org/jira/browse/FLINK-6938 > Project: Flink > Issue Type: Sub-task > Components: CEP > Reporter: Jark Wu > Assignee: Jark Wu > Fix For: 1.4.0 > > > In FLIP-20, we need IterativeCondition to support an {{open()}} method to > compile the generated code once. We do not want to insert a if condition in > the {{filter()}} method. So I suggest make IterativeCondition support > {{RichFunction}} interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)