protected long calculateRetainedMemorySize() {
    return root.ramBytesUsed()
        + children.stream()
            .map(PipelineMemoryEstimator::calculateRetainedMemorySize)
            .reduce(0L, Long::sum);
  }
Calculate the estimated running memory size of the pipeline.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/memory/PipelineMemoryEstimator.java