Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windowStateTable not working properly #24

Open
yj-1plusx opened this issue Mar 27, 2018 · 0 comments
Open

windowStateTable not working properly #24

yj-1plusx opened this issue Mar 27, 2018 · 0 comments

Comments

@yj-1plusx
Copy link

Hi, thanks for the great library!

One problem I encountered was when I tried to test a TumblingWindow aggregation.
Let's say I create a 2 second tumbling window like so:
val w = TimeWindows .of(TimeUnit.SECONDS.toMillis(2)) .advanceBy(TimeUnit.SECONDS.toMillis(2)) .until(TimeUnit.SECONDS.toMillis(2))

Now, I use the CustomTimestampExtractor and send in events with value "number@timestamp", e.g.
("a", "1@1000"), ("a", "1@1500"), ("a", "1@2000"), ("a", "1@10000"), ("a", "1@100")
I run a simple count aggregation and would expect count to be (0->2), (2000->1), (10000->1), because the last event arrives when the time window [0,2000) is already closed because of until(2000). However, the last event is accounted for.
Could this be an interpretation, that the until duration is understood as a lower bound?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant