@Test
  public void testIdentitySinkNodeMemoryEstimatorWithDop16() throws IllegalPathException {
    TypeProvider typeProvider = new TypeProvider();
    IdentitySinkNode identitySinkNode = initIdentitySinkNode(typeProvider);
    LocalExecutionPlanContext context =
        createLocalExecutionPlanContextWithQueryId(typeProvider, new QueryId("test_dop8"));
    context.setDegreeOfParallelism(16);

    // Validate PipelineMemoryEstimator
    try (Operator root = identitySinkNode.accept(operatorTreeGenerator, context)) {
      PipelineMemoryEstimator rootPipelineMemoryEstimator =
          context.constructPipelineMemoryEstimator(root, null, identitySinkNode, -1);
      assertEquals(
          ConsumeChildrenOneByOnePipelineMemoryEstimator.class,
          rootPipelineMemoryEstimator.getClass());
      // all the pipeline under this node will be executed concurrently
      assertEquals(
          3,
          ((ConsumeChildrenOneByOnePipelineMemoryEstimator) rootPipelineMemoryEstimator)
              .getConcurrentRunningChildrenNumForTest());

      List<PipelineMemoryEstimator> childrenPipelineMemoryEstimators =
          rootPipelineMemoryEstimator.getChildren();
      assertEquals(3, childrenPipelineMemoryEstimators.size());
      for (int i = 0; i < 3; i++) {
        assertEquals(
            ConsumeAllChildrenPipelineMemoryEstimator.class,
            childrenPipelineMemoryEstimators.get(i).getClass());
        assertEquals(
            FullOuterTimeJoinOperator.class,
            childrenPipelineMemoryEstimators.get(i).getRoot().getClass());
        for (int j = 0; j < 3; j++) {
          assertEquals(
              ConsumeAllChildrenPipelineMemoryEstimator.class,
              childrenPipelineMemoryEstimators.get(i).getChildren().get(j).getClass());
          assertEquals(
              SeriesScanOperator.class,
              childrenPipelineMemoryEstimators.get(i).getChildren().get(j).getRoot().getClass());
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      fail();
    }
  }
The operator structure is:

<p>IdentitySinkOperator - [ExchangeOperator - FullOuterTimeJoinOperator1 -
[SeriesScanOperator1, ExchangeOperator, ExchangeOperator], ExchangeOperator -
FullOuterTimeJoinOperator2 - [SeriesScanOperator4, ExchangeOperator, ExchangeOperator],
ExchangeOperator - FullOuterTimeJoinOperator3 - [SeriesScanOperator7, ExchangeOperator,
ExchangeOperator]]

<p>This test will test dop = 4. Expected result is ten pipelines with dependency:

<p>The pipeline0 is: ExchangeOperator - SeriesOperator2.

<p>The pipeline1 is: ExchangeOperator - SeriesOperator3.

<p>The pipeline2 is: ExchangeOperator - FullOuterTimeJoinOperator1 - [SeriesScanOperator1,
ExchangeOperator, ExchangeOperator]

<p>The pipeline3 is: ExchangeOperator - SeriesOperator5, which has dependency 2.

<p>The pipeline4 is: ExchangeOperator - SeriesOperator6, which has dependency 2.

<p>The pipeline5 is: ExchangeOperator - FullOuterTimeJoinOperator2 - [SeriesScanOperator4,
ExchangeOperator, ExchangeOperator], which has dependency 2.

<p>The pipeline7 is: ExchangeOperator - SeriesOperator5, which has dependency 5.

<p>The pipeline8 is: ExchangeOperator - SeriesOperator6, which has dependency 5.

<p>The pipeline9 is: ExchangeOperator - FullOuterTimeJoinOperator2 - [SeriesScanOperator4,
ExchangeOperator, ExchangeOperator], which has dependency 5.

<p>The pipeline10 is: IdentitySinkOperator - [ExchangeOperator1, ExchangeOperator2,
ExchangeOperator3]
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineBuilderTest.java