presto-main/src/main/java/io/prestosql/operator/WorkProcessorUtils.java/WorkProcessorUtils/flatTransform
class WorkProcessorUtils:    static <T, R> WorkProcessor<R> flatTransform(WorkProcessor<T> processor, Transformation<T, WorkProcessor<R>> transformation)
    {
        requireNonNull(processor, "processor is null");
        requireNonNull(transformation, "transformation is null");
        return processor.transform(transformation).transformProcessor(WorkProcessorUtils::flatten);
    }