private PatternTreeMap<ModEntry, ModsSerializer> getAllModifications(TsFileResource resource) {
    return fileModCache.computeIfAbsent(
        resource.getTsFilePath(),
        k -> {
          PatternTreeMap<ModEntry, ModsSerializer> modifications =
              PatternTreeMapFactory.getModsPatternTreeMap();
          for (ModEntry modification : resource.getAllModEntries()) {
            modifications.append(modification.keyOfPatternTree(), modification);
          }
          return modifications;
        });
  }
Every time we generate the queryContext, register it to queryTimeManager.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryContext.java