private static AbstractAlignedTimeSeriesMetadata setModifications(
      TsFileResource resource,
      TimeseriesMetadata timeColumnMetadata,
      List<TimeseriesMetadata> valueColumnMetadataList,
      AlignedFullPath alignedPath,
      QueryContext context,
      Filter globalTimeFilter,
      boolean ignoreAllNullRows) {
    long startTime = System.nanoTime();

    // deal with time column
    List<ModEntry> timeModifications =
        context.getPathModifications(
            resource, alignedPath.getDeviceId(), timeColumnMetadata.getMeasurementId());
    // all rows are deleted, just return null to skip device data in this file
    if (ModificationUtils.isAllDeletedByMods(
        timeModifications,
        timeColumnMetadata.getStatistics().getStartTime(),
        timeColumnMetadata.getStatistics().getEndTime())) {
      return null;
    }
    boolean modified = !timeModifications.isEmpty();
    timeColumnMetadata.setModified(modified);
    context
        .getQueryStatistics()
        .getAlignedTimeSeriesMetadataModificationCount()
        .getAndAdd(timeModifications.size());

    // deal with value columns
    boolean hasNonNullValueColumns = false;
    List<List<ModEntry>> valueColumnsModifications = new ArrayList<>();
    for (int i = 0, size = valueColumnMetadataList.size(); i < size; i++) {
      TimeseriesMetadata valueColumnMetadata = valueColumnMetadataList.get(i);
      if (valueColumnMetadata != null) {
        List<ModEntry> modifications =
            context.getPathModifications(
                resource, alignedPath.getDeviceId(), valueColumnMetadata.getMeasurementId());
        valueColumnMetadata.setModified(!modifications.isEmpty());
        valueColumnsModifications.add(modifications);
        modified = (modified || !modifications.isEmpty());
        context
            .getQueryStatistics()
            .getAlignedTimeSeriesMetadataModificationCount()
            .getAndAdd(modifications.size());

        // this value column is all deleted
        if (ModificationUtils.isAllDeletedByMods(
            modifications,
            valueColumnMetadata.getStatistics().getStartTime(),
            valueColumnMetadata.getStatistics().getEndTime())) {
          valueColumnMetadataList.set(i, null);
        } else {
          hasNonNullValueColumns = true;
        }
      } else {
        valueColumnsModifications.add(Collections.emptyList());
      }
    }

    if (ignoreAllNullRows && !hasNonNullValueColumns) {
      return null;
    }

    timeColumnMetadata.setModified(modified);

    AbstractAlignedTimeSeriesMetadata alignedTimeSeriesMetadata =
        ignoreAllNullRows
            ? new AlignedTimeSeriesMetadata(timeColumnMetadata, valueColumnMetadataList)
            : new TableDeviceTimeSeriesMetadata(timeColumnMetadata, valueColumnMetadataList);

    alignedTimeSeriesMetadata.setChunkMetadataLoader(
        new DiskAlignedChunkMetadataLoader(
            resource,
            context,
            globalTimeFilter,
            timeModifications,
            valueColumnsModifications,
            ignoreAllNullRows));

    long costTime = System.nanoTime() - startTime;
    context.getQueryStatistics().getAlignedTimeSeriesMetadataModificationTime().getAndAdd(costTime);
    return alignedTimeSeriesMetadata;
  }
Load AlignedTimeSeriesMetadata for aligned time series.

@param resource corresponding TsFileResource
@param alignedPath instance of VectorPartialPath, vector's full path, e.g. (root.sg1.d1.vector,
    [root.sg1.d1.vector.s1, root.sg1.d1.vector.s2])
@throws IOException IOException may be thrown while reading it from disk.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java