presto-main/src/main/java/io/prestosql/operator/aggregation/histogram/GroupedTypedHistogram.java/GroupedTypedHistogram/iterateGroupNodes
class GroupedTypedHistogram:    private void iterateGroupNodes(long groupdId, NodeReader nodeReader)
    {
        // while the index can be a long, the value is always an int
        int currentPointer = (int) headPointers.get(groupdId);
        checkArgument(currentPointer != NULL, "valid group must have non-null head pointer");

        while (currentPointer != NULL) {
            checkState(currentPointer < nextNodePointer, "error, corrupt pointer; max valid %s, found %s", nextNodePointer, currentPointer);
            nodeReader.read(currentPointer);
            currentPointer = nextPointers.get(currentPointer);
        }
    }