@Override
  public TemplatedLogicalPlanBuilder withNewRoot(PlanNode newRoot) {
    this.root = newRoot;
    return this;
  }
This class provides accelerated implementation for multiple devices align by device query. This
optimization is only used for devices set in only one template, using template can avoid many
unnecessary judgements.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TemplatedLogicalPlanBuilder.java