public static List<TimeRange> constructDeletionList(
      IDeviceID deviceID,
      String measurement,
      IMemTable memTable,
      List<Pair<ModEntry, IMemTable>> modsToMemtable,
      long timeLowerBound) {
    List<TimeRange> deletionList = new ArrayList<>();
    deletionList.add(new TimeRange(Long.MIN_VALUE, timeLowerBound));
    for (ModEntry modification : getModificationsForMemtable(memTable, modsToMemtable)) {
      if (modification.affects(deviceID)
          && modification.affects(measurement)
          && modification.getEndTime() > timeLowerBound) {
        long lowerBound = Math.max(modification.getStartTime(), timeLowerBound);
        deletionList.add(new TimeRange(lowerBound, modification.getEndTime()));
      }
    }
    return TimeRange.sortAndMerge(deletionList);
  }
construct a deletion list from a memtable.

@param memTable memtable
@param timeLowerBound time watermark
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ModificationUtils.java