You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2019/09/07 05:45:00 UTC
[jira] [Updated] (FLINK-13999) Correct the documentation of
MATCH_RECOGNIZE
[ https://issues.apache.org/jira/browse/FLINK-13999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dian Fu updated FLINK-13999:
----------------------------
Description:
Regarding to the following [example|#aggregations]] in the doc:
{code:java}
SELECT *
FROM Ticker
MATCH_RECOGNIZE (
PARTITION BY symbol
ORDER BY rowtime
MEASURES
FIRST(A.rowtime) AS start_tstamp,
LAST(A.rowtime) AS end_tstamp,
AVG(A.price) AS avgPrice
ONE ROW PER MATCH
AFTER MATCH SKIP TO FIRST B
PATTERN (A+ B)
DEFINE
A AS AVG(A.price) < 15
) MR;
{code}
Given the inputs shown in the doc, it should be:
{code:java}
symbol start_tstamp end_tstamp avgPrice
========= ================== ================== ============
ACME 01-APR-11 10:00:00 01-APR-11 10:00:03 14.5{code}
instead of:
{code:java}
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
{code}
was:
Regarding to the following [example|[https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/streaming/match_recognize.html#aggregations]] in the doc:
{code:java}
SELECT *
FROM Ticker
MATCH_RECOGNIZE (
PARTITION BY symbol
ORDER BY rowtime
MEASURES
FIRST(A.rowtime) AS start_tstamp,
LAST(A.rowtime) AS end_tstamp,
AVG(A.price) AS avgPrice
ONE ROW PER MATCH
AFTER MATCH SKIP TO FIRST B
PATTERN (A+ B)
DEFINE
A AS AVG(A.price) < 15
) MR;
{code}
Given the inputs shown in the doc, it should be:
{code:java}
symbol start_tstamp end_tstamp avgPrice
========= ================== ================== ============
ACME 01-APR-11 10:00:00 01-APR-11 10:00:03 14.5{code}
instead of:
{code:java}
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
{code}
> Correct the documentation of MATCH_RECOGNIZE
> --------------------------------------------
>
> Key: FLINK-13999
> URL: https://issues.apache.org/jira/browse/FLINK-13999
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Reporter: Dian Fu
> Priority: Major
>
> Regarding to the following [example|#aggregations]] in the doc:
> {code:java}
> SELECT *
> FROM Ticker
> MATCH_RECOGNIZE (
> PARTITION BY symbol
> ORDER BY rowtime
> MEASURES
> FIRST(A.rowtime) AS start_tstamp,
> LAST(A.rowtime) AS end_tstamp,
> AVG(A.price) AS avgPrice
> ONE ROW PER MATCH
> AFTER MATCH SKIP TO FIRST B
> PATTERN (A+ B)
> DEFINE
> A AS AVG(A.price) < 15
> ) MR;
> {code}
> Given the inputs shown in the doc, it should be:
> {code:java}
> symbol start_tstamp end_tstamp avgPrice
> ========= ================== ================== ============
> ACME 01-APR-11 10:00:00 01-APR-11 10:00:03 14.5{code}
> instead of:
> {code:java}
> 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
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)