public void writeAlignedTablet(
      InsertTabletNode insertTabletNode, int start, int end, TSStatus[] results) {

    List<IMeasurementSchema> schemaList = new ArrayList<>();
    for (int i = 0; i < insertTabletNode.getMeasurementSchemas().length; i++) {
      if (insertTabletNode.getColumns()[i] == null
          || (insertTabletNode.getColumnCategories() != null
              && insertTabletNode.getColumnCategories()[i] != TsTableColumnCategory.FIELD)) {
        schemaList.add(null);
      } else {
        schemaList.add(insertTabletNode.getMeasurementSchemas()[i]);
      }
    }
    if (schemaList.isEmpty()) {
      return;
    }
    final List<Pair<IDeviceID, Integer>> deviceEndOffsetPair =
        insertTabletNode.splitByDevice(start, end);
    int splitStart = start;
    for (Pair<IDeviceID, Integer> pair : deviceEndOffsetPair) {
      final IDeviceID deviceID = pair.left;
      int splitEnd = pair.right;
      IWritableMemChunkGroup memChunkGroup =
          createAlignedMemChunkGroupIfNotExistAndGet(deviceID, schemaList);
      memChunkGroup.writeTablet(
          insertTabletNode.getTimes(),
          insertTabletNode.getColumns(),
          insertTabletNode.getBitMaps(),
          schemaList,
          splitStart,
          splitEnd,
          results);
      splitStart = splitEnd;
    }
  }
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