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

Jiayi Liao commented on FLINK-10284:
------------------------------------

[~hequn8128] I'm afraid that the example can't pass the testing.

I use this in TumblingEventTimeWindowsTest and it failed.

{code:java}
@Test
public void testWindowAssignment() {
        WindowAssigner.WindowAssignerContext mockContext =
                        mock(WindowAssigner.WindowAssignerContext.class);

        TumblingEventTimeWindows assigner = 
TumblingEventTimeWindows.of(Time.days(1), Time.hours(-8));

        assertThat(assigner.assignWindows("String", 0L, mockContext), 
contains(timeWindow(0, 5000)));
        assertThat(assigner.assignWindows("String", 4999L, mockContext), 
contains(timeWindow(0, 5000)));
        assertThat(assigner.assignWindows("String", 5000L, mockContext), 
contains(timeWindow(5000, 10000)));
}
{code}


> TumblingEventTimeWindows's offset should can be less than zero.
> ---------------------------------------------------------------
>
>                 Key: FLINK-10284
>                 URL: https://issues.apache.org/jira/browse/FLINK-10284
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.6.0
>            Reporter: Jiayi Liao
>            Assignee: Jiayi Liao
>            Priority: Major
>
> My goal is to create a window from 0am to the next day's 0am within GMT+8 
> timezone, so I choose to use TumblingEventTimeWindows.of(Time.of(1, 
> TimeUnit.DAYS)), which uses UTC timezone to implement the range of "day". And 
> it doesn't allow me to write an offset -8 in the TumblingEventTimeWindows, 
> which can help me fix the offset of timezone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to