diff --git a/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java index 20549d156254..84b559485697 100644 --- a/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java @@ -390,7 +390,7 @@ public AddPageWork(Block block) public boolean process() { int positionCount = block.getPositionCount(); - checkState(lastPosition < positionCount, "position count out of bound"); + checkState(lastPosition <= positionCount, "position count out of bound"); int remainingPositions = positionCount - lastPosition; while (remainingPositions != 0) { @@ -437,7 +437,7 @@ public AddDictionaryPageWork(DictionaryBlock block) public boolean process() { int positionCount = block.getPositionCount(); - checkState(lastPosition < positionCount, "position count out of bound"); + checkState(lastPosition <= positionCount, "position count out of bound"); // needRehash() == false indicates we have reached capacity boundary and a rehash is needed. // We can only proceed if tryRehash() successfully did a rehash. @@ -524,7 +524,7 @@ public GetGroupIdsWork(Block block) public boolean process() { int positionCount = block.getPositionCount(); - checkState(lastPosition < positionCount, "position count out of bound"); + checkState(lastPosition <= positionCount, "position count out of bound"); checkState(!finished); int remainingPositions = positionCount - lastPosition; @@ -581,7 +581,7 @@ public GetDictionaryGroupIdsWork(DictionaryBlock block) public boolean process() { int positionCount = block.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. diff --git a/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java index 3b7112e341cc..caded3bf4ffd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java @@ -591,7 +591,7 @@ public AddNonDictionaryPageWork(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"); int remainingPositions = positionCount - lastPosition; while (remainingPositions != 0) { @@ -641,7 +641,7 @@ public AddDictionaryPageWork(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"); // needRehash() == false indicates we have reached capacity boundary and a rehash is needed. // We can only proceed if tryRehash() successfully did a rehash. @@ -777,7 +777,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); int remainingPositions = positionCount - lastPosition; @@ -899,7 +899,7 @@ public GetDictionaryGroupIdsWork(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.