private void updateMemCost(
      TSDataType dataType,
      String measurement,
      IDeviceID deviceId,
      int start,
      int end,
      long[] memIncrements,
      Object column) {
    // memIncrements = [memTable, text, chunk metadata] respectively

    IWritableMemChunk memChunk = workMemTable.getWritableMemChunk(deviceId, measurement);
    if (memChunk == null) {
      // ChunkMetadataIncrement
      memIncrements[2] += ChunkMetadata.calculateRamSize(measurement, dataType);
      memIncrements[0] +=
          ((end - start) / PrimitiveArrayManager.ARRAY_SIZE + 1)
              * TVList.tvListArrayMemCost(dataType);
    } else {
      long currentChunkPointNum = memChunk.rowCount();
      if (currentChunkPointNum % PrimitiveArrayManager.ARRAY_SIZE == 0) {
        memIncrements[0] +=
            ((end - start) / PrimitiveArrayManager.ARRAY_SIZE + 1)
                * memChunk.getWorkingTVList().tvListArrayMemCost();
      } else {
        long acquireArray =
            (end - start - 1 + (currentChunkPointNum % PrimitiveArrayManager.ARRAY_SIZE))
                / PrimitiveArrayManager.ARRAY_SIZE;
        if (acquireArray != 0) {
          memIncrements[0] += acquireArray * memChunk.getWorkingTVList().tvListArrayMemCost();
        }
      }
    }
    // TEXT data size
    if (dataType.isBinary()) {
      Binary[] binColumn = (Binary[]) column;
      memIncrements[1] += MemUtils.getBinaryColumnSize(binColumn, start, end, null);
    }
  }
Insert batch data of insertTabletPlan into the workingMemtable. The rows to be inserted are in
the range [start, end). Null value in each column values will be replaced by the subsequent
non-null value, e.g., {1, null, 3, null, 5} will be {1, 3, 5, null, 5}

@param insertTabletNode insert a tablet of a device
@param rangeList start and end index list of rows to be inserted in insertTabletPlan
@param results result array
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java