presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/Util.java/Util/transpose
class Util:    public static PlanNode transpose(PlanNode parent, PlanNode child)
    {
        return child.replaceChildren(ImmutableList.of(
                parent.replaceChildren(
                        child.getSources())));
    }