presto-spi/src/main/java/io/prestosql/spi/predicate/TupleDomain.java/TupleDomain/transform
class TupleDomain:    public <U> TupleDomain<U> transform(Function<T, U> function)
    {
        if (!domains.isPresent()) {
            return TupleDomain.none();
        }

        HashMap<U, Domain> result = new LinkedHashMap<>(domains.get().size());
        for (Map.Entry<T, Domain> entry : domains.get().entrySet()) {
            U key = function.apply(entry.getKey());

            if (key == null) {
                continue;
            }

            Domain previous = result.put(key, entry.getValue());

            if (previous != null) {
                throw new IllegalArgumentException(format("Every argument must have a unique mapping. %s maps to %s and %s", entry.getKey(), entry.getValue(), previous));
            }
        }

        return TupleDomain.withColumnDomains(result);
    }