public static PlanNode replaceChildren(PlanNode node, List<PlanNode> children) {
    for (int i = 0; i < node.getChildren().size(); i++) {
      if (children.get(i) != node.getChildren().get(i)) {
        return node.replaceChildren(children);
      }
    }
    return node;
  }
Return an identical copy of the given node with its children replaced
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ChildReplacer.java