private void collectSchemaFromOneFile(
      List<AlignedChunkMetadata> alignedChunkMetadataList,
      TsFileSequenceReader reader,
      Set<MeasurementSchema> schemaSet,
      Set<String> measurementSet)
      throws IOException {
    for (AlignedChunkMetadata alignedChunkMetadata : alignedChunkMetadataList) {
      List<IChunkMetadata> valueChunkMetadataList =
          alignedChunkMetadata.getValueChunkMetadataList();
      for (IChunkMetadata chunkMetadata : valueChunkMetadataList) {
        if (chunkMetadata == null || measurementSet.contains(chunkMetadata.getMeasurementUid())) {
          continue;
        }
        measurementSet.add(chunkMetadata.getMeasurementUid());
        Chunk chunk = reader.readMemChunk((ChunkMetadata) chunkMetadata);
        ChunkHeader header = chunk.getHeader();
        schemaSet.add(
            new MeasurementSchema(
                header.getMeasurementID(),
                header.getDataType(),
                header.getEncodingType(),
                header.getCompressionType()));
      }
    }
  }
collect the measurement metadata from list of alignedChunkMetadata list, and sort them in
dictionary order.

@param readerAndChunkMetadataList list of reader and alignedChunkMetadata list
@return schema list sorted by dictionary order
@throws IOException if io errors occurred
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/AlignedSeriesCompactionExecutor.java