presto-spi/src/main/java/io/prestosql/spi/predicate/AllOrNoneValueSet.java/AllOrNoneValueSet/checkCompatibility
class AllOrNoneValueSet:    private AllOrNoneValueSet checkCompatibility(ValueSet other)
    {
        if (!getType().equals(other.getType())) {
            throw new IllegalArgumentException(format("Mismatched types: %s vs %s", getType(), other.getType()));
        }
        if (!(other instanceof AllOrNoneValueSet)) {
            throw new IllegalArgumentException(format("ValueSet is not a AllOrNoneValueSet: %s", other.getClass()));
        }
        return (AllOrNoneValueSet) other;
    }