public static MeasurementPath deserialize(ByteBuffer byteBuffer) {
    PartialPath partialPath = PartialPath.deserialize(byteBuffer);
    MeasurementPath measurementPath = new MeasurementPath();
    byte isNull = ReadWriteIOUtils.readByte(byteBuffer);
    if (isNull == 1) {
      byte type = ReadWriteIOUtils.readByte(byteBuffer);
      if (type == MeasurementSchemaType.MEASUREMENT_SCHEMA.getMeasurementSchemaTypeInByteEnum()) {
        measurementPath.measurementSchema = MeasurementSchema.deserializeFrom(byteBuffer);
      } else if (type
          == MeasurementSchemaType.VECTOR_MEASUREMENT_SCHEMA.getMeasurementSchemaTypeInByteEnum()) {
        measurementPath.measurementSchema = VectorMeasurementSchema.deserializeFrom(byteBuffer);
      } else if (type
          == MeasurementSchemaType.LOGICAL_VIEW_SCHEMA.getMeasurementSchemaTypeInByteEnum()) {
        measurementPath.measurementSchema = LogicalViewSchema.deserializeFrom(byteBuffer);
      } else {
        throw new RuntimeException(
            new UnexpectedException("Type (" + type + ") of measurementSchema is unknown."));
      }
    }
    isNull = ReadWriteIOUtils.readByte(byteBuffer);
    if (isNull == 1) {
      measurementPath.tagMap = ReadWriteIOUtils.readMap(byteBuffer);
    }
    measurementPath.isUnderAlignedEntity = ReadWriteIOUtils.readBoolObject(byteBuffer);
    measurementPath.measurementAlias = ReadWriteIOUtils.readString(byteBuffer);
    measurementPath.nodes = partialPath.getNodes();
    measurementPath.device = measurementPath.getIDeviceID();
    measurementPath.fullPath = measurementPath.getFullPath();
    return measurementPath;
  }
if isUnderAlignedEntity is true, return an AlignedPath with only one sub sensor otherwise,
return itself
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java