presto-main/src/main/java/io/prestosql/execution/scheduler/FixedSourcePartitionedScheduler.java/FixedSourcePartitionedScheduler/drainCompletedLifespans
class FixedSourcePartitionedScheduler:        @Override
        public List<Lifespan> drainCompletedLifespans()
        {
            if (!completed) {
                List<Lifespan> lifespans = sourceScheduler.drainCompletedLifespans();
                if (lifespans.isEmpty()) {
                    return ImmutableList.of();
                }
                checkState(ImmutableList.of(Lifespan.taskWide()).equals(lifespans));
                completed = true;
            }
            List<Lifespan> result = ImmutableList.copyOf(pendingCompleted);
            pendingCompleted.clear();
            return result;
        }