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

Yueting Chen commented on FLINK-7292:
-------------------------------------

Hi [~litrain],
Thanks for bringing it up. But I don't think the result should contain an empty 
match in your example. In general, {{a?}} means we should try to find a single 
match for {{a}} first, if it fails, then an empty result should be generated. I 
think for the match pattern {{a?}} and the input events {{b1,a1}} , the result 
should be {{\[empty match],a1}}.

IMO, the only meaning that empty result exists is that it indicates how many 
match times was processed. Maybe in some use cases it is useful. 

> Fix EMPTY MATCH bug in CEP.
> ---------------------------
>
>                 Key: FLINK-7292
>                 URL: https://issues.apache.org/jira/browse/FLINK-7292
>             Project: Flink
>          Issue Type: New Feature
>          Components: CEP
>            Reporter: zhangxiaoyu
>
> Currently, with the pattern {quote}a? {quote}and the event{quote} a1{quote}, 
> the result pattern is only{quote} a1{quote}without the empty match.
> We wish the empty matched is also returned. And I am working on this issue 
> now.
> My method is  checking if there exists empty match only when the the first 
> event comes(at the StartState) ——try to traverse the PROCEED edges with the 
> trueFunction condition from the StartState, see if it can arrive FinalState, 
> if so, add an empty list to the result.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to