Github user dawidwys commented on a diff in the pull request:
https://github.com/apache/flink/pull/6138#discussion_r195736943
--- Diff: docs/dev/libs/cep.md ---
@@ -275,36 +275,38 @@ with "foo", and if the sum of the prices of the
previously accepted events for t
<div class="codetabs" markdown="1">
<div data-lang="java" markdown="1">
{% highlight java %}
-middle.oneOrMore().where(new IterativeCondition<SubEvent>() {
- @Override
- public boolean filter(SubEvent value, Context<SubEvent> ctx) throws
Exception {
- if (!value.getName().startsWith("foo")) {
- return false;
- }
-
- double sum = value.getPrice();
- for (Event event : ctx.getEventsForPattern("middle")) {
- sum += event.getPrice();
+middle.oneOrMore()
+ .subtype(SubEvent.class)
--- End diff --
Either don't add the `subtype` clause or add it also in the scala example.
---