[ 
https://issues.apache.org/jira/browse/FLINK-18446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17148308#comment-17148308
 ] 

franklin DREW commented on FLINK-18446:
---------------------------------------

!image-2020-06-30-12-51-24-055.png!

> Flink SQL CEP can no recognize keywords MATCH_RECOGINZE from Joins
> ------------------------------------------------------------------
>
>                 Key: FLINK-18446
>                 URL: https://issues.apache.org/jira/browse/FLINK-18446
>             Project: Flink
>          Issue Type: Test
>          Components: API / DataStream
>    Affects Versions: 1.8.1
>            Reporter: franklin DREW
>            Priority: Major
>         Attachments: image-2020-06-29-17-14-00-144.png, 
> image-2020-06-29-17-53-55-931.png, image-2020-06-30-12-51-24-055.png, 
> screenshot-1.png
>
>
> sql text :
> insert 
> into
>  test_result
>  select
>  `start_timestamp`,
>  `end_timestamp`,
>  `event`,
>  y.mobileno,
>  case 
>  when trim(x.lastcomplete_step) is null then 'wcsjhyz' 
>  else TRIM(x.lastcomplete_step) 
>  end as lastcomplete_step,
>  z.step_name,
>  y.branchno,
>  y.custname,
>  case 
>  when TRIM(y.brokerno) is null then '空' 
>  else TRIM(y.brokerno) 
>  end as brokerno,
>  ROWTIME 
>  FROM
>  rt_wskh_t_accepted_schedule x,
>  rt_wskh_t_accepted_cert_info y,
>  dic_cust_break z 
>  WHERE
>  x.user_id = y.id 
>  and case 
>  when trim(x.lastcomplete_step) is null then 'wcsjhyz' 
>  else trim(x.lastcomplete_step) 
>  end = z.step_code 
>  AND (
>  TRIM(x.lastcomplete_step) is null 
>  or x.lastcomplete_step <> 'visitsurvey'
>  ) MATCH_RECOGINZE ( PARTITION 
>  BY
>  y.mobileno 
>  ORDER BY
>  ROWTIME MEASURES e2.`x.lastcomplete_step` as `event`,
>  e1.`ROWTIME` as `start_timestamp`,
>  LAST(e2.`ROWTIME`) as `end_timestamp` ONE ROW PER MATCH AFTER MATCH SKIP TO 
> NEXT ROW PATTERN (e1 e2+) WITHIN INTERVAL '20' MINUTE DEFINE e1 as 
> e1.x.lastcomplete_step = e2.x.lastcomplete_step );
> error info:<error> org.apache.flink.table.api.SqlParserException: SQL parse 
> failed. Encountered "MATCH_RECOGINZE" at line 1, column 1078.
> Was expecting one of:
>  <EOF> 
>  "ORDER" ...
>  "LIMIT" ...
>  "OFFSET" ...
>  "FETCH" ...
>  "GROUP" ...
>  "HAVING" ...
>  "WINDOW" ...
>  "UNION" ...
>  "INTERSECT" ...
>  "EXCEPT" ...
>  "MINUS" ...
>  "NOT" ...
>  "IN" ...
>  "<" ...
>  "<=" ...
>  ">" ...
>  ">=" ...
>  "=" ...
>  "<>" ...
>  "!=" ...
>  "BETWEEN" ...
>  "LIKE" ...
>  "SIMILAR" ...
>  "+" ...
>  "-" ...
>  "*" ...
>  "/" ...
>  "%" ...
>  "||" ...
>  "AND" ...
>  "OR" ...
>  "IS" ...
>  "MEMBER" ...
>  "SUBMULTISET" ...
>  "CONTAINS" ...
>  "OVERLAPS" ...
>  "EQUALS" ...
>  "PRECEDES" ...
>  "SUCCEEDS" ...
>  "IMMEDIATELY" ...
>  "MULTISET" ...
>  "[" ...
>  "YEAR" ...
>  "MONTH" ...
>  "DAY" ...
>  "HOUR" ...
>  "MINUTE" ...
>  "SECOND" ...
>  
>  at 
> org.apache.flink.table.calcite.FlinkPlannerImpl.parse(FlinkPlannerImpl.scala:94)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to