This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch beyyes/fix_sonar
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/beyyes/fix_sonar by this push:
     new ca5d70e8fc2 fix code smells in InsertRowNode.java
ca5d70e8fc2 is described below

commit ca5d70e8fc2d59112d357d5831ab57109c2ee8dd
Author: Beyyes <[email protected]>
AuthorDate: Wed Jun 21 16:19:34 2023 +0800

    fix code smells in InsertRowNode.java
---
 .../planner/plan/node/write/InsertRowNode.java     | 40 +++++++++++++++++++---
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertRowNode.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertRowNode.java
index 5ec224d1b67..2c8134b2b2b 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertRowNode.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertRowNode.java
@@ -434,7 +434,12 @@ public class InsertRowNode extends InsertNode implements 
WALEntryValue {
     isAligned = buffer.get() == 1;
   }
 
-  /** Make sure the dataTypes and values have been created before calling 
this. */
+  /**
+   * Make sure the dataTypes and values have been created before calling this.
+   *
+   * @param buffer - ByteBuffer
+   * @throws UnSupportedDataTypeException - If meets unsupported data type.
+   */
   private void fillDataTypesAndValues(ByteBuffer buffer) {
     for (int i = 0; i < dataTypes.length; i++) {
       // types are not determined, the situation mainly occurs when the node 
uses string values
@@ -603,7 +608,14 @@ public class InsertRowNode extends InsertNode implements 
WALEntryValue {
     }
   }
 
-  /** Deserialize from wal. */
+  /**
+   * Deserialize from wal.
+   *
+   * @param stream - DataInputStream
+   * @return InsertRowNode
+   * @throws IOException - If an I/O error occurs.
+   * @throws IllegalArgumentException - If meets illegal argument.
+   */
   public static InsertRowNode deserializeFromWAL(DataInputStream stream) 
throws IOException {
     // we do not store plan node id in wal entry
     InsertRowNode insertNode = new InsertRowNode(new PlanNodeId(""));
@@ -633,7 +645,13 @@ public class InsertRowNode extends InsertNode implements 
WALEntryValue {
     isAligned = stream.readByte() == 1;
   }
 
-  /** Make sure the dataTypes and values have been created before calling 
this. */
+  /**
+   * Make sure the dataTypes and values have been created before calling this.
+   *
+   * @param stream - DataInputStream
+   * @throws IOException - If an I/O error occurs.
+   * @throws UnSupportedDataTypeException - If meets unsupported data type.
+   */
   public void fillDataTypesAndValuesFromWAL(DataInputStream stream) throws 
IOException {
     for (int i = 0; i < dataTypes.length; i++) {
       byte typeNum = stream.readByte();
@@ -666,7 +684,13 @@ public class InsertRowNode extends InsertNode implements 
WALEntryValue {
     }
   }
 
-  /** Deserialize from wal. */
+  /**
+   * Deserialize from wal.
+   *
+   * @param buffer - ByteBuffer
+   * @return InsertRowNode
+   * @throws IllegalArgumentException - If meets illegal argument
+   */
   public static InsertRowNode deserializeFromWAL(ByteBuffer buffer) {
     // we do not store plan node id in wal entry
     InsertRowNode insertNode = new InsertRowNode(new PlanNodeId(""));
@@ -696,7 +720,13 @@ public class InsertRowNode extends InsertNode implements 
WALEntryValue {
     isAligned = buffer.get() == 1;
   }
 
-  /** Make sure the dataTypes and values have been created before calling 
this. */
+  /**  */
+  /**
+   * Make sure the dataTypes and values have been created before calling this.
+   *
+   * @param buffer - ByteBuffer
+   * @throws UnSupportedDataTypeException - If meets unsupported data type.
+   */
   public void fillDataTypesAndValuesFromWAL(ByteBuffer buffer) {
     for (int i = 0; i < dataTypes.length; i++) {
       byte typeNum = buffer.get();

Reply via email to