presto-hive/src/main/java/io/prestosql/plugin/hive/util/ThrottledAsyncQueue.java/ThrottledAsyncQueue/maxBatchSize
class ThrottledAsyncQueue:    private int maxBatchSize(int maxSize)
    {
        return Math.min(maxSize, Math.min(size(), maxBatchSizePerSec));
    }