presto-spi/src/main/java/io/prestosql/spi/predicate/ValueSet.java/ValueSet/copyOf
class ValueSet:    static ValueSet copyOf(Type type, Collection<Object> values)
    {
        if (type.isOrderable()) {
            return SortedRangeSet.copyOf(type, values.stream()
                    .map(value -> Range.equal(type, value))
                    .collect(toList()));
        }
        if (type.isComparable()) {
            return EquatableValueSet.copyOf(type, values);
        }
        throw new IllegalArgumentException("Cannot create discrete ValueSet with non-comparable type: " + type);
    }