flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dawidwys <...@git.apache.org>
Subject [GitHub] flink pull request #3477: [Flink-3318][cep] Add support for quantifiers to C...
Date Tue, 14 Mar 2017 09:34:48 GMT
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3477#discussion_r105855625
  
    --- Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
---
    @@ -217,23 +217,22 @@ public void prune(long pruningTimestamp) {
     			// use a depth first search to reconstruct the previous relations
     			while (!extractionStates.isEmpty()) {
     				ExtractionState<K, V> extractionState = extractionStates.pop();
    -				DeweyNumber currentVersion = extractionState.getVersion();
     				// current path of the depth first search
     				Stack<SharedBufferEntry<K, V>> currentPath = extractionState.getPath();
     
     				// termination criterion
    -				if (currentVersion.length() == 1) {
    -					LinkedHashMultimap<K, V> completePath = LinkedHashMultimap.create();
    +				if (extractionState.getEntry() == null) {
    +					final LinkedHashMultimap<K, V> completePath = LinkedHashMultimap.create();
     
     					while(!currentPath.isEmpty()) {
    -						SharedBufferEntry<K, V> currentEntry = currentPath.pop();
    +						final SharedBufferEntry<K, V> currentEntry = currentPath.pop();
     
     						completePath.put(currentEntry.getKey(), currentEntry.getValueTime().getValue());
     					}
     
     					result.add(completePath);
     				} else {
    -					SharedBufferEntry<K, V> currentEntry = extractionState.getEntry();
    --- End diff --
    
    If you mean outside the `if-else` then right. I've done that.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message