presto-spi/src/main/java/io/prestosql/spi/type/VarcharType.java/VarcharType/getBoundedLength
class VarcharType:    public int getBoundedLength()
    {
        if (isUnbounded()) {
            throw new IllegalStateException("Cannot get size of unbounded VARCHAR.");
        }
        return length;
    }