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

Jörn Kottmann commented on FLINK-15841:
---------------------------------------

A new method with the correct behavior could be added and then intersects could 
be deprecated. Flink probably has also code which uses the method as specified 
in the JavaDoc.

In flink-streaming-java these tests failed:
 {{[INFO] Results:
 [INFO] 
 [ERROR] Failures: 
 [ERROR] StreamSourceOperatorWatermarksTest.testNoMaxWatermarkOnAsyncCancel:127
 [ERROR] DynamicEventTimeSessionWindowsTest.testMergeConsecutiveWindows:121 
 Wanted but not invoked:
 mergeCallback.merge(
 iterable over [<TimeWindow

{start=0, end=1}>, <TimeWindow\{start=1, end=2}>, <TimeWindow\{start=2, 
end=3}>] in any order,
 TimeWindow\{start=0, end=3}
 );
 -> at 
org.apache.flink.streaming.runtime.operators.windowing.DynamicEventTimeSessionWindowsTest.testMergeConsecutiveWindows(DynamicEventTimeSessionWindowsTest.java:121)
 Actually, there were zero interactions with this mock.
 
 [ERROR] 
DynamicProcessingTimeSessionWindowsTest.testMergeConsecutiveWindows:126 
 Wanted but not invoked:
 mergeCallback.merge(
 iterable over [<TimeWindow\{start=0, end=1}

>, <TimeWindow

{start=1, end=2}>, <TimeWindow\{start=2, end=3}>] in any order,
 TimeWindow\{start=0, end=3}
 );
 -> at 
org.apache.flink.streaming.runtime.operators.windowing.DynamicProcessingTimeSessionWindowsTest.testMergeConsecutiveWindows(DynamicProcessingTimeSessionWindowsTest.java:126)
 Actually, there were zero interactions with this mock.
 
 [ERROR] EventTimeSessionWindowsTest.testMergeConsecutiveWindows:114 
 Wanted but not invoked:
 mergeCallback.merge(
 iterable over [<TimeWindow\{start=0, end=1}>, <TimeWindow\{start=1, end=2}

>, <TimeWindow

{start=2, end=3}>] in any order,
 TimeWindow\{start=0, end=3}
 );
 -> at 
org.apache.flink.streaming.runtime.operators.windowing.EventTimeSessionWindowsTest.testMergeConsecutiveWindows(EventTimeSessionWindowsTest.java:114)
 Actually, there were zero interactions with this mock.
 
 [ERROR] MergingWindowSetTest.testLateMerging:230 
expected:<TimeWindow\{start=5, end=13}> but was:<TimeWindow\{start=8, end=10}>
 [ERROR] ProcessingTimeSessionWindowsTest.testMergeConsecutiveWindows:118 
 Wanted but not invoked:
 mergeCallback.merge(
 iterable over [<TimeWindow\{start=0, end=1}>, <TimeWindow\{start=1, end=2}>, 
<TimeWindow\{start=2, end=3}

>] in any order,
 TimeWindow

{start=0, end=3}

);
 -> at 
org.apache.flink.streaming.runtime.operators.windowing.ProcessingTimeSessionWindowsTest.testMergeConsecutiveWindows(ProcessingTimeSessionWindowsTest.java:118)
 Actually, there were zero interactions with this mock.
 }}

> TimeWindow.intersects return true for consecutive windows
> ---------------------------------------------------------
>
>                 Key: FLINK-15841
>                 URL: https://issues.apache.org/jira/browse/FLINK-15841
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>            Priority: Trivial
>
> The TimeWindow JavaDoc explains that the start index is inclusive and the end 
> index is exclusive, therefore two windows T0 to T1 and T1 to T2 are next to 
> each other without overlapping.
> To fix this the intersects comparison should be changed to: {{this.start < 
> other.end && this.end > other.start}}
> Also a test should be added to verify the methods works correctly.



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

Reply via email to