Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4041#discussion_r119602408
  
    --- Diff: docs/dev/libs/cep.md ---
    @@ -65,21 +67,49 @@ Next, you have to add the FlinkCEP dependency to the 
`pom.xml` of your project.
     Note that FlinkCEP is currently not part of the binary distribution.
     See linking with it for cluster execution 
[here]({{site.baseurl}}/dev/linking.html).
     
    -Now you can start writing your first CEP program using the pattern API.
    +Now you can start writing your first CEP program using the Pattern API.
    +
    +<span class="label label-danger">Attention</span> The events in the 
`DataStream` to which
    +you want to apply pattern matching have to implement proper `equals()` and 
`hashCode()` methods
    +because these are used for comparing and matching events.
     
     <div class="codetabs" markdown="1">
     <div data-lang="java" markdown="1">
     {% highlight java %}
     DataStream<Event> input = ...
     
    -Pattern<Event, ?> pattern = Pattern.begin("start").where(evt -> 
evt.getId() == 42)
    -    .next("middle").subtype(SubEvent.class).where(subEvt -> 
subEvt.getVolume() >= 10.0)
    -    .followedBy("end").where(evt -> evt.getName().equals("end"));
    +Pattern<Event, ?> pattern = Pattern.begin("start").where(
    --- End diff --
    
    I think Pattern."<Event>" is required?


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

Reply via email to