presto-spi/src/main/java/io/prestosql/spi/type/VarcharType.java/VarcharType/getRange
class VarcharType:    @Override
    public Optional<Range> getRange()
    {
        if (length > 100) {
            // The max/min values may be materialized in the plan, so we don't want them to be too large.
            // Range comparison against large values are usually nonsensical, too, so no need to support them
            // beyond a certain size. They specific choice above is arbitrary and can be adjusted if needed.
            return Optional.empty();
        }

        int codePointSize = SliceUtf8.lengthOfCodePoint(MAX_CODE_POINT);

        Slice max = Slices.allocate(codePointSize * length);
        int position = 0;
        for (int i = 0; i < length; i++) {
            position += SliceUtf8.setCodePointAt(MAX_CODE_POINT, max, position);
        }

        return Optional.of(new Range(Slices.EMPTY_SLICE, max));
    }