Hi,
I'm using Flink 1.9 and testing MATCH_RECOGNIZE by following [1]. While testing the query in [2] on myself, I've got the different result from [2] The query result from [2] is as follows: The other query result from the attached maven project (which only contains a sample program that executes the query in [2]) is as follows:ACME,1970-01-01 00:00:01.0,1970-01-01 00:00:04.0,14.5 There's just one entry, not two. (As you might notice, the time of the first record in the attached maven project is 1970-01-01 00:00:01 for testing. The other numbers are the same.) I dug into the internal implementation of CepOperator and got the followings:
My observation is that, when "ACME,5000,25.0,2" comes in (line 15), we get a completed match (line 16) but no partial match (which is [A*1] in my notation) starting from it. According to the definition of "AFTER MATCH SKIP TO FIRST B", as "ACME,5000,25,2" is B, a new match should start from "ACME,5000,25.0,2". However, a new match starts from the next one (line 18, 19) in the above trace. Therefore, when the last one "ACME,11000,30.0,1" comes in, the average at that point is 14.3(=2+4+10+15+25+30/6) which is less than 15 so "ACME,11000,30.0,1" belongs to A, not B as shown in the example. Is it a bug? or did I miss something conceptually? p.s. how do you load rows from a local csv file with rowtime configured? I don't like the way I implemented my custom table source in the attached file which I use for testing. Best, Dongwon |
Oops, I think I explained something wrong in the previous email. B means not A. Therefore, after the completed match, there must be no new partial match starting from there. There's nothing wrong with the implementation, but the example in [2] is wrong. Am I right? Best, Dongwon On Thu, Sep 5, 2019 at 9:15 PM Dongwon Kim <[hidden email]> wrote:
|
Hi Dongwon, I guess you are right and the example is wrong. The new matching sequence should start from line "18". Regards, Dian
|
I have created ticket https://issues.apache.org/jira/browse/FLINK-13999 to track it.
|
Free forum by Nabble | Edit this page |