You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Konstantin Knauf (Jira)" <ji...@apache.org> on 2021/07/29 07:28:14 UTC

[jira] [Reopened] (FLINK-12044) Flink CEP discards events as late if they have timestamps <= 0

     [ https://issues.apache.org/jira/browse/FLINK-12044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Knauf reopened FLINK-12044:
--------------------------------------

Re-opening in accordance with https://issues.apache.org/jira/browse/FLINK-23206.

> Flink CEP discards events as late if they have timestamps <= 0
> --------------------------------------------------------------
>
>                 Key: FLINK-12044
>                 URL: https://issues.apache.org/jira/browse/FLINK-12044
>             Project: Flink
>          Issue Type: Bug
>          Components: Library / CEP
>    Affects Versions: 1.7.2
>            Reporter: Arseniy Tashoyan
>            Priority: Minor
>              Labels: auto-closed
>
> Let's make an input stream like this:
> {code:scala}
> env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)
> val events = env.fromElements(
>       Event(timestamp = 0L, siteId),
>       Event(timestamp = 500L, siteId)
> )
> .assignTimestampsAndWatermarks(new BoundedOutOfOrdernessTimestampExtractor{...})
> {code}
> For this stream the event with timestamp = 0L will be treated as late. The reason is AbstractKeyedCEPPatternOperator that initializes lastWatermark with the default value provided by the compiler: zero. Would it be more correct to initialize lastWatermark with Long.MIN_VALUE?
> Of course, this is not a blocking defect, but I had really hard times to find why my unit test disregards the first event. Strictly speaking, this behavior seems incorrect.



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