private void putDataTypesAndValues(IWALByteBufferView buffer) {
    for (int i = 0; i < values.length; i++) {
      // ignore failed partial insert
      if (measurements[i] == null) {
        continue;
      }
      // serialize null value
      if (values[i] == null) {
        WALWriteUtils.write(
            dataTypes[i] == null ? TYPE_NULL_WITHOUT_TYPE : TYPE_NULL_WITH_TYPE, buffer);
        if (dataTypes[i] != null) {
          WALWriteUtils.write(dataTypes[i], buffer);
        }
        continue;
      }
      WALWriteUtils.write(dataTypes[i], buffer);
      switch (dataTypes[i]) {
        case BOOLEAN:
          WALWriteUtils.write((Boolean) values[i], buffer);
          break;
        case INT32:
        case DATE:
          WALWriteUtils.write((Integer) values[i], buffer);
          break;
        case INT64:
        case TIMESTAMP:
          WALWriteUtils.write((Long) values[i], buffer);
          break;
        case FLOAT:
          WALWriteUtils.write((Float) values[i], buffer);
          break;
        case DOUBLE:
          WALWriteUtils.write((Double) values[i], buffer);
          break;
        case TEXT:
        case BLOB:
        case STRING:
          WALWriteUtils.write((Binary) values[i], buffer);
          break;
        default:
          throw new UnSupportedDataTypeException(UNSUPPORTED_DATA_TYPE + dataTypes[i]);
      }
    }
  }
Serialize data types and values, ignoring failed time series.

@param buffer - IWALByteBufferView
@throws UnSupportedDataTypeException - If meets unsupported data type.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java