Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/4041#discussion_r119607645
--- Diff: docs/dev/libs/cep.md ---
@@ -659,37 +913,45 @@ val patternStream: PatternStream[Event] =
CEP.pattern(input, pattern)
</div>
</div>
+The input stream can be *keyed* or *non-keyed* depending on your use-case.
+
+<span class="label label-danger">Attention</span> Applying your pattern on
a non-keyed stream will result is a job with
+parallelism equal to 1.
+
### Selecting from Patterns
+
Once you have obtained a `PatternStream` you can select from detected
event sequences via the `select` or `flatSelect` methods.
<div class="codetabs" markdown="1">
<div data-lang="java" markdown="1">
The `select` method requires a `PatternSelectFunction` implementation.
A `PatternSelectFunction` has a `select` method which is called for each
matching event sequence.
-It receives a map of string/event pairs of the matched events.
-The string is defined by the name of the state to which the event has been
matched.
-The `select` method can return exactly one result.
+It receives a match in the form of `Map<String, List<IN>>` where the key
is the name of each state in your pattern
+sequence and the value is a list of all accepted events for that state
(`IN` is the type of your input elements).
--- End diff --
Perhaps add information about the ordering of the list of matched events?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---