presto-main/src/main/java/io/prestosql/operator/aggregation/histogram/SingleTypedHistogram.java/SingleTypedHistogram/SingleTypedHistogram
class SingleTypedHistogram:    private SingleTypedHistogram(Type type, int expectedSize, int hashCapacity, BlockBuilder values)
    {
        this.type = type;
        this.expectedSize = expectedSize;
        this.hashCapacity = hashCapacity;
        this.values = values;

        checkArgument(expectedSize > 0, "expectedSize must be greater than zero");

        maxFill = calculateMaxFill(hashCapacity);
        mask = hashCapacity - 1;
        hashPositions = new IntBigArray(-1);
        hashPositions.ensureCapacity(hashCapacity);
        counts = new LongBigArray();
        counts.ensureCapacity(hashCapacity);
    }