mayuehappy commented on code in PR #19259:
URL: https://github.com/apache/flink/pull/19259#discussion_r843463168


##########
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java:
##########
@@ -333,6 +337,10 @@ private boolean isStateTimedOut(final ComputationState 
state, final long timesta
             boolean shouldDiscardPath = false;
             for (final ComputationState newComputationState : 
newComputationStates) {
 
+                if (isStartState(computationState) && 
newComputationState.getStartTimestamp() > 0) {
+                    nfaState.setNewStartPartiailMatch();

Review Comment:
   I re-read the code. If newComputationState satisfies the first take edge, 
the timestamp of the state here comes from eventWrapper. Then we should set 
`isNewStartPartialMatch` to be true
   In other cases, the startTimpstamp should be -1, indicating that the 
conditions for begin are not met. Then `isNewStartPartialMatch` should net be 
set. 
   So if the start timestamp equal to 0 , it may means that the timestamp of  
Event in the StateNode is 0 (maybe in some test case )?  I think it still 
should set as NewStartPartiailMatchs.
   BTW, it maybe looks better in this way ` if (isStartState(computationState) 
&& newComputationState.getStartTimestamp() != -1)`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to