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.
Things to be very careful about:
- backwards compatibility (we previously serialized conditions) - changes to those interfaces have to be done carefully
- we want to be able to add dynamic patterns in the future, so at some point we have to open also on control message arrival