private long[] checkAlignedMemCost(
      InsertTabletNode insertTabletNode, int start, int end, boolean noFailure, TSStatus[] results)
      throws WriteProcessException {
    List<Pair<IDeviceID, Integer>> deviceEndPosList = insertTabletNode.splitByDevice(start, end);
    long[] memIncrements = new long[NUM_MEM_TO_ESTIMATE];
    int splitStart = start;
    for (Pair<IDeviceID, Integer> iDeviceIDIntegerPair : deviceEndPosList) {
      int splitEnd = iDeviceIDIntegerPair.getRight();
      IDeviceID deviceID = iDeviceIDIntegerPair.getLeft();
      long[] splitMemIncrements =
          checkAlignedMemCostAndAddToTspForTablet(
              deviceID,
              insertTabletNode.getMeasurements(),
              insertTabletNode.getDataTypes(),
              insertTabletNode.getColumns(),
              insertTabletNode.getColumnCategories(),
              splitStart,
              splitEnd,
              noFailure,
              results);
      for (int i = 0; i < NUM_MEM_TO_ESTIMATE; i++) {
        memIncrements[i] += splitMemIncrements[i];
      }
      splitStart = splitEnd;
    }
    return memIncrements;
  }
Insert data in an InsertRowNode into the workingMemtable.

@param insertRowNode physical plan of insertion
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java