private DataPartition parseDataPartitionResp(
      final TDataPartitionTableResp dataPartitionTableResp) {
    final Set<TConsensusGroupId> uniqueConsensusGroupIds = new HashSet<>();
    for (final Map<
            String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TConsensusGroupId>>>>
        partitionTable : Collections.singleton(dataPartitionTableResp.getDataPartitionTable())) {
      for (final Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TConsensusGroupId>>>
          seriesPartitionMap : partitionTable.values()) {
        for (final Map<TTimePartitionSlot, List<TConsensusGroupId>> timePartitionMap :
            seriesPartitionMap.values()) {
          for (final List<TConsensusGroupId> consensusGroupIds : timePartitionMap.values()) {
            uniqueConsensusGroupIds.addAll(consensusGroupIds);
          }
        }
      }
    }

    final List<TRegionReplicaSet> allRegionReplicaSets =
        partitionCache.getRegionReplicaSet(new ArrayList<>(uniqueConsensusGroupIds));
    final List<TConsensusGroupId> consensusGroupIds = new ArrayList<>(uniqueConsensusGroupIds);
    final Map<TConsensusGroupId, TRegionReplicaSet> regionReplicaSetMap = new HashMap<>();
    for (int i = 0; i < allRegionReplicaSets.size(); i++) {
      regionReplicaSetMap.put(consensusGroupIds.get(i), allRegionReplicaSets.get(i));
    }

    final Map<String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TRegionReplicaSet>>>>
        regionReplicaSet = new HashMap<>();
    for (final Map.Entry<
            String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TConsensusGroupId>>>>
        entry1 : dataPartitionTableResp.getDataPartitionTable().entrySet()) {
      final Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TRegionReplicaSet>>> result1 =
          regionReplicaSet.computeIfAbsent(entry1.getKey(), k -> new HashMap<>());
      for (final Map.Entry<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TConsensusGroupId>>>
          entry2 : entry1.getValue().entrySet()) {
        final Map<TTimePartitionSlot, List<TRegionReplicaSet>> result2 =
            result1.computeIfAbsent(entry2.getKey(), k -> new HashMap<>());
        for (final Map.Entry<TTimePartitionSlot, List<TConsensusGroupId>> entry3 :
            entry2.getValue().entrySet()) {
          final List<TRegionReplicaSet> regionReplicaSets = new ArrayList<>();
          for (TConsensusGroupId groupId : entry3.getValue()) {
            regionReplicaSets.add(regionReplicaSetMap.get(groupId));
          }
          result2.put(entry3.getKey(), regionReplicaSets);
        }
      }
    }

    return new DataPartition(
        regionReplicaSet,
        config.getSeriesPartitionExecutorClass(),
        config.getSeriesPartitionSlotNum());
  }
For query, DataPartitionQueryParam is shared by each device
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ClusterPartitionFetcher.java