cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 624 forks source link

Fix HashTable::BuildLazy if it contains zero emelemts #1408

Closed tcm-marcel closed 6 years ago

tcm-marcel commented 6 years ago

Avoids a call to NextPowerOf2 with zero when the hash table doesn't contain any elements in the function HashTable::BuildLazy. Occurred when running TPC-H Q3 in Peloton.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 76.975% when pulling d17e679437aad8d0e43eb3d555f688aa0feaaf7e on tcm-marcel:fix/hashtable into 7d85d5f6cecf73978ea6f1e175f3014dd6036b20 on cmu-db:master.

tcm-marcel commented 6 years ago

@pmenon I changed the line to an early exit and added a test case.