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 2021/11/11 12:16:10 UTC

[GitHub] [iotdb] SilverNarcissus commented on a change in pull request #4355: Adapt serialization/deserialization in CreateTemplatePlan with former template structure

SilverNarcissus commented on a change in pull request #4355:
URL: https://github.com/apache/iotdb/pull/4355#discussion_r747431322



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/CreateTemplatePlan.java
##########
@@ -381,6 +414,9 @@ public void serialize(DataOutputStream stream) throws IOException {
 
     ReadWriteIOUtils.write(name, stream);
 
+    // write -1 as flag to note that there is no schemaNames and new nested list for compressors
+    ReadWriteIOUtils.write(-1, stream);

Review comment:
       Same as above

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/CreateTemplatePlan.java
##########
@@ -284,6 +285,9 @@ public void serialize(ByteBuffer buffer) {
 
     ReadWriteIOUtils.write(name, buffer);
 
+    // write -1 as flag to note that there is no schemaNames and new nested list for compressors
+    ReadWriteIOUtils.write(-1, buffer);

Review comment:
       -1 should be extract as a constant.

##########
File path: server/src/test/java/org/apache/iotdb/db/metadata/MManagerBasicTest.java
##########
@@ -957,6 +962,26 @@ public void testTemplateInnerTree() {
     }
   }
 
+  @Test
+  public void testSerializationAdaptation() throws IOException {

Review comment:
       Is there any test of current serialize and deserialize?




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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