Skip to content

Commit

Permalink
Fix bounds check in MultiChannelGroupByHash
Browse files Browse the repository at this point in the history
There's an off-by-one error in the check that can
cause a failure when the page is empty
  • Loading branch information
martint committed Mar 27, 2018
1 parent 84be87e commit 0095d1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public GetNonDictionaryGroupIdsWork(Page page)
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.
Expand Down

0 comments on commit 0095d1d

Please sign in to comment.