presto-main/src/main/java/io/prestosql/util/DisjointSet.java/DisjointSet/findInternal
class DisjointSet:    private T findInternal(T element)
    {
        Entry<T> value = map.get(element);
        if (value.getParent() == null) {
            return element;
        }
        else {
            T root = findInternal(value.getParent());
            value.setParent(root);
            return root;
        }
    }