Fix bounds check in MultiChannelGroupByHash
There's an off-by-one error in the check that can
cause a failure when the page is empty
@@ -632,7 +632,7 @@ public class MultiChannelGroupByHash
public boolean process()
{
int positionCount = page.getPositionCount();
- checkState(lastPosition < positionCount, "position count out of bound");
+ checkState(lastPosition <= positionCount, "position count out of bound");
checkState(!finished);
// needRehash() == false indicates we have reached capacity boundary and a rehash is needed.
