You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/22 08:34:02 UTC

[GitHub] asfgit closed pull request #7158: [FLINK-10980][docs] Fix Iterable Scala code in CEP part

asfgit closed pull request #7158: [FLINK-10980][docs] Fix Iterable Scala code in CEP part
URL: https://github.com/apache/flink/pull/7158
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/dev/libs/cep.md b/docs/dev/libs/cep.md
index c8e836349ef..ce9a9c3d72b 100644
--- a/docs/dev/libs/cep.md
+++ b/docs/dev/libs/cep.md
@@ -1527,8 +1527,8 @@ The events for a given pattern are ordered by timestamp. The reason for returnin
 
 {% highlight scala %}
 def selectFn(pattern : Map[String, Iterable[IN]]): OUT = {
-    val startEvent = pattern.get("start").get.next
-    val endEvent = pattern.get("end").get.next
+    val startEvent = pattern.get("start").get.head
+    val endEvent = pattern.get("end").get.head
     OUT(startEvent, endEvent)
 }
 {% endhighlight %}
@@ -1539,8 +1539,8 @@ The `flatSelect` method is similar to the `select` method. Their only difference
 
 {% highlight scala %}
 def flatSelectFn(pattern : Map[String, Iterable[IN]], collector : Collector[OUT]) = {
-    val startEvent = pattern.get("start").get.next
-    val endEvent = pattern.get("end").get.next
+    val startEvent = pattern.get("start").get.head
+    val endEvent = pattern.get("end").get.head
     for (i <- 0 to startEvent.getValue) {
         collector.collect(OUT(startEvent, endEvent))
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services