presto-main/src/main/java/io/prestosql/sql/planner/optimizations/PlanNodeSearcher.java/PlanNodeSearcher/findOnlyElement
class PlanNodeSearcher:    public <T extends PlanNode> T findOnlyElement(T defaultValue)
    {
        List<T> all = findAll();
        if (all.size() == 0) {
            return defaultValue;
        }
        return getOnlyElement(all);
    }