presto-main/src/main/java/io/prestosql/operator/StageExecutionDescriptor.java/StageExecutionDescriptor/StageExecutionDescriptor
class StageExecutionDescriptor:    private StageExecutionDescriptor(StageExecutionStrategy strategy, Set<PlanNodeId> groupedExecutionScanNodes)
    {
        switch (strategy) {
            case UNGROUPED_EXECUTION:
                checkArgument(groupedExecutionScanNodes.isEmpty(), "groupedExecutionScanNodes must be empty if stage execution strategy is ungrouped execution");
                break;
            case FIXED_LIFESPAN_SCHEDULE_GROUPED_EXECUTION:
            case DYNAMIC_LIFESPAN_SCHEDULE_GROUPED_EXECUTION:
                checkArgument(!groupedExecutionScanNodes.isEmpty(), "groupedExecutionScanNodes cannot be empty if stage execution strategy is grouped execution");
                break;
            default:
                throw new IllegalArgumentException("Unsupported stage execution strategy: " + strategy);
        }

        this.stageExecutionStrategy = requireNonNull(strategy, "strategy is null");
        this.groupedExecutionScanNodes = requireNonNull(groupedExecutionScanNodes, "groupedExecutionScanNodes is null");
    }