[jira] [Comment Edited] (CALCITE-1911) Support WITHIN clause in MATCH_RECOGNIZE
[ https://issues.apache.org/jira/browse/CALCITE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123278#comment-16123278 ] Dian Fu edited comment on CALCITE-1911 at 8/11/17 12:38 PM: Have updated the PR according to review comments. Have also added the following method in {{LogicalMatch}}. Although this is not related to this JIRA, but the change is very small and so just fix it here. {code} public RelNode accept(RelShuttle shuttle) { return shuttle.visit(this); } {code} was (Author: dian.fu): Have updated the PR according to review comments. Have also added the following method in {{LogicalMatch}}. Although this is not related to this JIRA, but the change is very small and so just fix it here. {quote} @Override public RelNode accept(RelShuttle shuttle) { return shuttle.visit(this); } {quote} > Support WITHIN clause in MATCH_RECOGNIZE > > > Key: CALCITE-1911 > URL: https://issues.apache.org/jira/browse/CALCITE-1911 > Project: Calcite > Issue Type: Bug >Reporter: Dian Fu >Assignee: Julian Hyde > Labels: match > > Window is an important feature for pattern detection, it defines the time > duration for the events to match a pattern. Here is an example from > [doc|https://docs.oracle.com/middleware/1213/eventprocessing/cql-reference/GUID-34D4968E-C55A-4BC7-B1CE-C84B202217BD.htm#CQLLR2119]: > {code} > SELECT T.Ac2, T.Bc2, T.Cc2 > FROM S > MATCH_RECOGNIZE( > MEASURES A.c2 as Ac2, B.c2 as Bc2, C.c2 as Cc2 > PATTERN (A (B+ | C)) within 3000 milliseconds > DEFINE > A as A.c1=10 or A.c1=25, > B as B.c1=20 or B.c1=15 or B.c1=25, > C as C.c1=15 > ) as T > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (CALCITE-1911) Support within clause in MATCH_RECOGNIZE
[ https://issues.apache.org/jira/browse/CALCITE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16108257#comment-16108257 ] Dian Fu edited comment on CALCITE-1911 at 8/1/17 1:36 AM: -- Correct, this is not in Oracle 12 and also not in the SQL standard, but I think this feature is very useful as window is very important for pattern detection. {quote} It assumes that there is a system column that defines the timestamp. Only possible in streaming queries, and even then, probably not well defined. {quote} Yes, that's right. For cases where there is no timestamp column, users don't need to define this clause and so there is no side effect. {quote} We should use the SQL standard notation for intervals: WITHIN INTERVAL '3' SECONDS rather than within 3000 milliseconds {quote} Make sense to me. was (Author: dian.fu): Yes, this is not in Oracle 12 and also not in the SQL standard, but I think this feature is very useful as window is very important for pattern detection. {quote} It assumes that there is a system column that defines the timestamp. Only possible in streaming queries, and even then, probably not well defined. {quote} Yes, that's right. For cases where there is no timestamp column, users don't need to define this clause and so there is no side effect. {quote} We should use the SQL standard notation for intervals: WITHIN INTERVAL '3' SECONDS rather than within 3000 milliseconds {quote} Make sense to me. > Support within clause in MATCH_RECOGNIZE > > > Key: CALCITE-1911 > URL: https://issues.apache.org/jira/browse/CALCITE-1911 > Project: Calcite > Issue Type: Bug >Reporter: Dian Fu >Assignee: Julian Hyde > Labels: match > > Window is an important feature for pattern detection, it defines the time > duration for the events to match a pattern. Here is an example from > [doc|https://docs.oracle.com/middleware/1213/eventprocessing/cql-reference/GUID-34D4968E-C55A-4BC7-B1CE-C84B202217BD.htm#CQLLR2119]: > {code} > SELECT T.Ac2, T.Bc2, T.Cc2 > FROM S > MATCH_RECOGNIZE( > MEASURES A.c2 as Ac2, B.c2 as Bc2, C.c2 as Cc2 > PATTERN (A (B+ | C)) within 3000 milliseconds > DEFINE > A as A.c1=10 or A.c1=25, > B as B.c1=20 or B.c1=15 or B.c1=25, > C as C.c1=15 > ) as T > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (CALCITE-1911) Support within clause in MATCH_RECOGNIZE
[ https://issues.apache.org/jira/browse/CALCITE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107993#comment-16107993 ] Julian Hyde edited comment on CALCITE-1911 at 7/31/17 9:42 PM: --- To be clear, this is not in Oracle 12, and it is not in the SQL standard. This is in Oracle fusion middleware's CQL. So, I am not yet convinced we should add this in the current form. A couple of immediate problems: * It assumes that there is a system column that defines the timestamp. Only possible in streaming queries, and even then, probably not well defined. * We should use the SQL standard notation for intervals: {{WITHIN INTERVAL '3' SECONDS}} rather than {{within 3000 milliseconds}} Cc [~ransom] was (Author: julianhyde): To be clear, this is not in Oracle 12, and it is not in the SQL standard. This is in Oracle fusion middleware's CQL. So, I am not yet convinced we should add this in the current form. A couple of immediate problems: * It assumes that there is a system column that defines the timestamp. Only possible in streaming queries, and even then, probably not well defined. * We should use the SQL standard notation for intervals: {{WITHIN INTERVAL '3' SECONDS}} rather than {{within 3000 milliseconds}} Cc [~zhiqiang,he] > Support within clause in MATCH_RECOGNIZE > > > Key: CALCITE-1911 > URL: https://issues.apache.org/jira/browse/CALCITE-1911 > Project: Calcite > Issue Type: Bug >Reporter: Dian Fu >Assignee: Julian Hyde > Labels: match > > Window is an important feature for pattern detection, it defines the time > duration for the events to match a pattern. Here is an example from > [doc|https://docs.oracle.com/middleware/1213/eventprocessing/cql-reference/GUID-34D4968E-C55A-4BC7-B1CE-C84B202217BD.htm#CQLLR2119]: > {code} > SELECT T.Ac2, T.Bc2, T.Cc2 > FROM S > MATCH_RECOGNIZE( > MEASURES A.c2 as Ac2, B.c2 as Bc2, C.c2 as Cc2 > PATTERN (A (B+ | C)) within 3000 milliseconds > DEFINE > A as A.c1=10 or A.c1=25, > B as B.c1=20 or B.c1=15 or B.c1=25, > C as C.c1=15 > ) as T > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)