public PlanNode rewrite(PlanNode node, C userContext) {
      PlanNode result = node.accept(nodeRewriter, new RewriteContext<>(nodeRewriter, userContext));
      return verifyNotNull(result, "nodeRewriter returned null for %s", node.getClass().getName());
    }
This method is meant for invoking the rewrite logic on children while processing a node
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SimplePlanRewriter.java