You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/09/22 08:43:25 UTC

[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema

neuyilan commented on a change in pull request #1749:
URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492568246



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java
##########
@@ -98,12 +98,11 @@ public static MeasurementSchema deserializeFrom(InputStream inputStream) throws
 
     measurementSchema.measurementId = ReadWriteIOUtils.readString(inputStream);

Review comment:
       Add one UT of the serialize and deserialize method

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java
##########
@@ -51,6 +51,35 @@ public static TSEncoding deserialize(short i) {
     }
   }
 
+  /**
+   * give an byte to return a encoding type.
+   *
+   * @param i byte number
+   * @return encoding type
+   */
+  public static TSEncoding byteToEnum(byte i) {
+    switch (i) {

Review comment:
       better to check the size of this parameter as TSDataType




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org