ilovesoup / hyracks

Automatically exported from code.google.com/p/hyracks
Apache License 2.0
0 stars 0 forks source link

CountFieldAggregatorFactory init to 1 #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Any aggregation test with Count
2.
3.

What is the expected output? What do you see instead?
If the count should be x, the output is x+1

Please use labels and text to provide additional information.
In CountFieldAggregatorFactory.java, in the init function, the line "int count 
= 1;" should be replaced with "int count = 0;"

Original issue reported on code.google.com by manish.h...@gmail.com on 2 Feb 2012 at 12:43

GoogleCodeExporter commented 9 years ago
Manish, could you give me more details about your tests (which operator you are 
using, HashGroupOperator or ExtHashGroupOperator or PreClusterGroupOperator)? 

In the code, the count should be initialized as 1, since it is initialized only 
when the first object of that key is encountered. 

Original comment by jarod...@gmail.com on 2 Feb 2012 at 9:54

GoogleCodeExporter commented 9 years ago
The problem has been resolved. It is not a bug, but the lazy-initialization is 
required by the GroupJoin operator. 

Original comment by jarod...@gmail.com on 21 Feb 2012 at 2:25