[
https://issues.apache.org/jira/browse/FLINK-7293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16110558#comment-16110558
]
ASF GitHub Bot commented on FLINK-7293:
---------------------------------------
Github user dawidwys commented on a diff in the pull request:
https://github.com/apache/flink/pull/4418#discussion_r130564756
--- Diff:
flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/CEP.scala
---
@@ -36,8 +38,26 @@ object CEP {
* @tparam T Type of the input events
* @return Resulting pattern stream
*/
- def pattern[T](input: DataStream[T], pattern: Pattern[T, _]):
PatternStream[T] = {
+ def pattern[T](input: DataStream[T], pattern: Pattern[T, _ <: T]):
PatternStream[T] = {
wrapPatternStream(JCEP.pattern(input.javaStream,
pattern.wrappedPattern))
}
+
+ /**
+ * Transforms a [[DataStream]] into a [[PatternStream]] in the Scala
API.
+ * See [[org.apache.flink.cep.CEP}]]for a more detailed description how
the underlying
+ * Java API works.
+ *
+ * @param input DataStream containing the input events
+ * @param pattern Pattern specification which shall be detected
+ * @param comparator Comparator to sort events
--- End diff --
could you describe in the doc when the operator is applied.
E.g the comparator is used for sorting events with the same timestamp in
case of EventTime or that arrived at the same moment.
> Support custom order by in PatternStream
> ----------------------------------------
>
> Key: FLINK-7293
> URL: https://issues.apache.org/jira/browse/FLINK-7293
> Project: Flink
> Issue Type: Sub-task
> Components: CEP
> Reporter: Dian Fu
> Assignee: Dian Fu
>
> Currently, when {{ProcessingTime}} is configured, the events are fed to NFA
> in the order of the arriving time and when {{EventTime}} is configured, the
> events are fed to NFA in the order of the event time. It should also allow
> custom {{order by}} to allow users to define the order of the events besides
> the above factors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)