COOL-cohort / COOL

the source code of the COOL system
https://www.comp.nus.edu.sg/~dbsystem/cool/
Apache License 2.0
45 stars 16 forks source link

Fix Bug (Can not pass Max, Min and Average Test) #90

Closed Zrealshadow closed 2 years ago

Zrealshadow commented 2 years ago

Fix the current engine to pass the unit test proposed in #88

For min aggregator, the initialized value of RetUnit is 0. If no value in dataset is smaller than 0, the final result is 0. It's same for max aggregator. I add a new property used, to check whether the RetUnit is the first time to calculate. If it is the first time, directly set the value to avoid the noise brought by the initialization.

For average aggregator, the current engine dosen't support float. Transfer the float ground truth of average unit test to int.