private static List<PartialPath> groupAlignedSeries(
      List<PartialPath> fullPaths, Map<IDeviceID, AlignedPath> deviceToAlignedPathMap) {
    List<PartialPath> result = new ArrayList<>();
    for (PartialPath path : fullPaths) {
      MeasurementPath measurementPath = (MeasurementPath) path;
      if (!measurementPath.isUnderAlignedEntity()) {
        result.add(measurementPath);
      } else {
        IDeviceID deviceName = measurementPath.getIDeviceID();
        if (!deviceToAlignedPathMap.containsKey(deviceName)) {
          AlignedPath alignedPath = new AlignedPath(measurementPath);
          deviceToAlignedPathMap.put(deviceName, alignedPath);
        } else {
          AlignedPath alignedPath = deviceToAlignedPathMap.get(deviceName);
          alignedPath.addMeasurement(measurementPath);
        }
      }
    }
    result.addAll(deviceToAlignedPathMap.values());
    return result;
  }
PartialPath of aligned time series will be organized to one AlignedPath. BEFORE this method,
all the aligned time series is NOT united. For example, given root.sg.d1.vector1[s1] and
root.sg.d1.vector1[s2], they will be organized to root.sg.d1.vector1 [s1,s2]

@param fullPaths full path list without uniting the sub measurement under the same aligned time
    series. The list has been sorted by the alphabetical order, so all the aligned time series
    of one device has already been placed contiguously.
@return Size of partial path list could NOT equal to the input list size. For example, the
    vector1 (s1,s2) would be returned once.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/MetaUtils.java