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

Bug while maintaining count in Stream Summary #6

Open
programmingprince opened this issue Jan 28, 2019 · 0 comments
Open

Bug while maintaining count in Stream Summary #6

programmingprince opened this issue Jan 28, 2019 · 0 comments

Comments

@programmingprince
Copy link

programmingprince commented Jan 28, 2019

It might be my misunderstanding, but I dont know why you have not reset the counter while adding a new item. I think you should set the count to the count of new item. Currently, the count of old element is maintained.
Bucket min = bucketList.first(); counterNode = min.counterList.tail(); Counter<T> counter = counterNode.getValue(); droppedItem = counter.getItem(); counterMap.remove(droppedItem); counter.setItem(item); counter.setError(min.count);
This code is from offerReturnAll method of StreamSummary class.

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