presto-main/src/main/java/io/prestosql/sql/planner/DistributedExecutionPlanner.java/DistributedExecutionPlanner/plan
class DistributedExecutionPlanner:    public StageExecutionPlan plan(SubPlan root, Session session)
    {
        ImmutableList.Builder<SplitSource> allSplitSources = ImmutableList.builder();
        try {
            return doPlan(root, session, allSplitSources);
        }
        catch (Throwable t) {
            allSplitSources.build().forEach(DistributedExecutionPlanner::closeSplitSource);
            throw t;
        }
    }