streaminer icon indicating copy to clipboard operation
streaminer copied to clipboard

Bug while maintaining count in Stream Summary

Open programmingprince opened this issue 6 years ago • 0 comments

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.

programmingprince avatar Jan 28 '19 10:01 programmingprince