You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2019/10/14 14:37:36 UTC
[flink] branch release-1.8 updated: [FLINK-13999][cep][docs]
Correct the example in the section of Aggregations of MATCH_RECOGNIZE
This is an automated email from the ASF dual-hosted git repository.
dwysakowicz pushed a commit to branch release-1.8
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.8 by this push:
new dc90f43 [FLINK-13999][cep][docs] Correct the example in the section of Aggregations of MATCH_RECOGNIZE
dc90f43 is described below
commit dc90f43e050a71aeaf0ced91c14d895f6512dfae
Author: Dian Fu <fu...@alibaba-inc.com>
AuthorDate: Mon Oct 14 15:54:48 2019 +0800
[FLINK-13999][cep][docs] Correct the example in the section of Aggregations of MATCH_RECOGNIZE
---
docs/dev/table/streaming/match_recognize.md | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/dev/table/streaming/match_recognize.md b/docs/dev/table/streaming/match_recognize.md
index 4aeb110..663c7d2 100644
--- a/docs/dev/table/streaming/match_recognize.md
+++ b/docs/dev/table/streaming/match_recognize.md
@@ -285,7 +285,7 @@ FROM Ticker
LAST(A.rowtime) AS end_tstamp,
AVG(A.price) AS avgPrice
ONE ROW PER MATCH
- AFTER MATCH SKIP TO FIRST B
+ AFTER MATCH SKIP PAST LAST ROW
PATTERN (A+ B)
DEFINE
A AS AVG(A.price) < 15
@@ -307,19 +307,20 @@ symbol rowtime price tax
'ACME' '01-Apr-11 10:00:07' 10 2
'ACME' '01-Apr-11 10:00:08' 15 2
'ACME' '01-Apr-11 10:00:09' 25 2
-'ACME' '01-Apr-11 10:00:10' 30 1
+'ACME' '01-Apr-11 10:00:10' 25 1
+'ACME' '01-Apr-11 10:00:11' 30 1
{% endhighlight %}
The query will accumulate events as part of the pattern variable `A` as long as the average price
of them does not exceed `15`. For example, such a limit exceeding happens at `01-Apr-11 10:00:04`.
-The following period exceeds the average price of `15` again at `01-Apr-11 10:00:10`. Thus the
+The following period exceeds the average price of `15` again at `01-Apr-11 10:00:11`. Thus the
results for said query will be:
{% highlight text %}
symbol start_tstamp end_tstamp avgPrice
========= ================== ================== ============
ACME 01-APR-11 10:00:00 01-APR-11 10:00:03 14.5
-ACME 01-APR-11 10:00:04 01-APR-11 10:00:09 13.5
+ACME 01-APR-11 10:00:05 01-APR-11 10:00:10 13.5
{% endhighlight %}
<span class="label label-info">Note</span> Aggregations can be applied to expressions, but only if