public PlanNode optimize(PlanNode rootWithExchange) {
    if (analysis.getTreeStatement() != null && analysis.getTreeStatement().isQuery()) {
      for (PlanOptimizer optimizer : optimizers) {
        rootWithExchange = optimizer.optimize(rootWithExchange, analysis, context);
      }
    }
    return rootWithExchange;
  }
Return true if we need to use ShuffleSinkNode instead of IdentitySinkNode.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanner.java