presto-main/src/main/java/io/prestosql/sql/planner/iterative/Memo.java/Memo/deleteGroup
class Memo:    private void deleteGroup(int group)
    {
        checkArgument(getGroup(group).incomingReferences.isEmpty(), "Cannot delete group that has incoming references");
        PlanNode deletedNode = groups.remove(group).membership;
        decrementReferenceCounts(deletedNode, group);
    }