public PlanNode defaultRewrite(PlanNode node, C context) {
      ImmutableList.Builder<PlanNode> children =
          ImmutableList.builderWithExpectedSize(node.getChildren().size());
      node.getChildren().forEach(source -> children.add(rewrite(source, context)));
      return replaceChildren(node, children.build());
    }
Invoke the rewrite logic recursively on children of the given node and swap it out with an
identical copy with the rewritten children
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SimplePlanRewriter.java