@Test
  public void testConsumeAllChildrenPipelineBuilderWithExchange() throws IllegalPathException {
    TypeProvider typeProvider = new TypeProvider();
    FullOuterTimeJoinNode fullOuterTimeJoinNode =
        initFullOuterTimeJoinNodeWithExchangeNode(typeProvider, 3, 3);
    LocalExecutionPlanContext context = createLocalExecutionPlanContext(typeProvider);
    context.setDegreeOfParallelism(1);

    List<Operator> childrenOperator =
        operatorTreeGenerator.dealWithConsumeAllChildrenPipelineBreaker(
            fullOuterTimeJoinNode, context);
    assertEquals(0, context.getPipelineNumber());
    assertEquals(6, childrenOperator.size());
    assertEquals(6, fullOuterTimeJoinNode.getChildren().size());
    for (int i = 0; i < 3; i++) {
      assertEquals(ExchangeOperator.class, childrenOperator.get(i).getClass());
      assertEquals(ExchangeNode.class, fullOuterTimeJoinNode.getChildren().get(i).getClass());
    }

    for (int i = 3; i < 6; i++) {
      assertEquals(SeriesScanOperator.class, childrenOperator.get(i).getClass());
      assertEquals(SeriesScanNode.class, fullOuterTimeJoinNode.getChildren().get(i).getClass());
      assertEquals(
          String.format("root.sg.d%d.s1", i - 3),
          fullOuterTimeJoinNode.getChildren().get(i).getOutputColumnNames().get(0));
    }

    // Validate the number exchange operator
    assertEquals(3, context.getExchangeSumNum());
  }
This test will test dop > 3. Expected result is same as dop = 3.
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineBuilderTest.java