SteNicholas commented on a change in pull request #13676:
URL: https://github.com/apache/flink/pull/13676#discussion_r508292895



##########
File path: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/CEP.java
##########
@@ -52,7 +52,48 @@
                        DataStream<T> input,
                        Pattern<T, ?> pattern,
                        EventComparator<T> comparator) {
-               final PatternStream<T> stream = new PatternStream<>(input, 
pattern);
-               return stream.withComparator(comparator);
+               return new PatternStream<>(input, 
pattern).withComparator(comparator);
+       }
+
+       /**
+        * Creates a {@link PatternStream} from an input data stream and a 
pattern.
+        *
+        * @param input DataStream containing the input events
+        * @param pattern Pattern specification which shall be detected
+        * @param isProcessingTime Time behaviour to specify processing time or 
event time
+        * @param <T> Type of the input events
+        * @return Resulting pattern stream
+        */
+       public static <T> PatternStream<T> pattern(
+                       DataStream<T> input,
+                       Pattern<T, ?> pattern,
+                       boolean isProcessingTime) {

Review comment:
       @aljoscha I would like to follow up the points you mentioned later to 
update the methods.




----------------------------------------------------------------
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.

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


Reply via email to