Github user dawidwys commented on a diff in the pull request: https://github.com/apache/flink/pull/3477#discussion_r106150129 --- Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/ComputationState.java --- @@ -74,11 +80,35 @@ public long getStartTimestamp() { return state; } + public State<T> getPreviousState() { + return previousState; + } + public T getEvent() { return event; } public DeweyNumber getVersion() { return version; } + + public static <T> ComputationState<T> createStartState(final State<T> state) { + Preconditions.checkArgument(state.isStart()); + return new ComputationState<>(state, null, null, -1L, new DeweyNumber(1), -1L); + } + + public static <T> ComputationState<T> createStartState(final State<T> state, final DeweyNumber version) { + Preconditions.checkArgument(state.isStart()); + return new ComputationState<>(state, null, null, -1L, version, -1L); + } + --- End diff -- Done
--- 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. ---