You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2019/08/28 07:58:00 UTC
[jira] [Commented] (FLINK-13881) CEP within method should applied
in every independent pattern
[ https://issues.apache.org/jira/browse/FLINK-13881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917520#comment-16917520 ]
Dawid Wysakowicz commented on FLINK-13881:
------------------------------------------
First of all to be clear, the current behavior is not a bug, but intentional behavior. However I always found the API misleading as you can set the within on every pattern separately.
Secondly, I think the feature you suggest definitely makes sense, it is not that easy to implement though because of how the pruning algorithm works. Support of this feature would probably require a major rework of that part. This definitely deserves a FLIP. As for the question if you should change the within implementation. I would say no. As I said this was in a way intended behavior, which is valid in many cases and we should not change it.
Lastly, I don't want to discourage you, but I don't have the capacity to help with it right now. You may try to look for support in the ML though.
> CEP within method should applied in every independent pattern
> -------------------------------------------------------------
>
> Key: FLINK-13881
> URL: https://issues.apache.org/jira/browse/FLINK-13881
> Project: Flink
> Issue Type: Improvement
> Components: Library / CEP
> Affects Versions: 1.9.0
> Reporter: YufeiLiu
> Priority: Major
>
> When I write a Pattern like this:
> {code:java}
> Pattern.begin("start").where()
> .followBy("middle0").where().within(Time.second(1))
> .followBy("middle1").where().within(Time.second(2))
> .followBy("middle2").where().within(Time.second(3))
> {code}
> the actual within time is the smallest: 1 second.
> I created a TimeCondition extends IterativeCondition, and I can get timestamp of current event and previous computation state, then I compare them in condition filter. Also make some change in NFACompiler, transform within as StateTransition rather than a gobal property "windowTime" of NFA.
> It could work, but I dont know should I change the implementation of within or create another syntax.
> [~dawidwys] Is this meaningful?
--
This message was sent by Atlassian Jira
(v8.3.2#803003)