presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/util/PageBuffer.java/PageBuffer/canAddRows
class PageBuffer:    private boolean canAddRows(int rowsToAdd)
    {
        return (usedMemoryBytes < maxMemoryBytes) &&
                ((rowCount + rowsToAdd) < Integer.MAX_VALUE);
    }