private void constructDeviceViewNodeListWithoutCrossRegion(
      List<PlanNode> deviceViewNodeList,
      List<DeviceViewSplit> deviceViewSplits,
      DeviceViewNode node,
      DistributionPlanContext context,
      Analysis analysis) {

    Map<TRegionReplicaSet, DeviceViewNode> regionDeviceViewMap = new HashMap<>();
    for (DeviceViewSplit split : deviceViewSplits) {
      if (split.dataPartitions.size() != 1) {
        throw new IllegalStateException(
            "In non-cross data region device-view situation, "
                + "each device should only have on data partition.");
      }
      TRegionReplicaSet region = split.dataPartitions.iterator().next();
      DeviceViewNode regionDeviceViewNode =
          regionDeviceViewMap.computeIfAbsent(
              region,
              k -> {
                DeviceViewNode deviceViewNode = cloneDeviceViewNodeWithoutChild(node, context);
                deviceViewNodeList.add(deviceViewNode);
                return deviceViewNode;
              });
      PlanNode childNode = split.buildPlanNodeInRegion(region, context.queryContext);
      if (analysis.isDeviceViewSpecialProcess()) {
        List<PlanNode> rewriteResult = rewrite(childNode, context);
        if (rewriteResult.size() != 1) {
          throw new IllegalStateException(
              "In non-cross data region aggregation device-view situation, "
                  + "each rewrite child node of DeviceView should only be one.");
        }
        childNode = rewriteResult.get(0);
      }
      regionDeviceViewNode.addChildDeviceNode(split.device, childNode);
    }
  }
aggregation align by device, and aggregation is `count_if` or `diff`, or aggregation used with
group by parameter (session, variation, count), use the old aggregation logic
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java