private void getMemAlignedChunkHandleFromMemTable(
      IDeviceID deviceID,
      List<IMeasurementSchema> schemaList,
      Map<String, List<IChunkMetadata>> chunkMetadataList,
      Map<String, List<IChunkHandle>> memChunkHandleMap,
      List<List<TimeRange>> deletionList) {

    AlignedWritableMemChunk alignedMemChunk =
        ((AlignedWritableMemChunkGroup) memTableMap.get(deviceID)).getAlignedMemChunk();

    boolean containsMeasurement = false;
    for (IMeasurementSchema measurementSchema : schemaList) {
      if (alignedMemChunk.containsMeasurement(measurementSchema.getMeasurementName())) {
        containsMeasurement = true;
        break;
      }
    }
    if (!containsMeasurement) {
      return;
    }

    List<BitMap> bitMaps = new ArrayList<>();
    long[] timestamps = alignedMemChunk.getFilteredTimestamp(deletionList, bitMaps, true);

    buildAlignedMemChunkHandle(
        deviceID,
        timestamps,
        bitMaps,
        deletionList,
        schemaList,
        chunkMetadataList,
        memChunkHandleMap);
  }
Create this MemChunk if it's not exist.

@param deviceId device id
@param schemaList measurement schemaList
@return this MemChunkGroup
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractMemTable.java