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

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


The following commit(s) were added to refs/heads/ty/TableModelGrammar by this 
push:
     new 45f0fef657c Fix deserialize method of ProjectNode
45f0fef657c is described below

commit 45f0fef657cd3c0670571d6ca456ddbb2ce63027
Author: Beyyes <[email protected]>
AuthorDate: Thu Jul 25 16:19:55 2024 +0800

    Fix deserialize method of ProjectNode
---
 .../db/queryengine/plan/relational/planner/node/ProjectNode.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ProjectNode.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ProjectNode.java
index 05fb45ecd07..50d9434c503 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ProjectNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ProjectNode.java
@@ -30,7 +30,6 @@ import org.apache.tsfile.utils.ReadWriteIOUtils;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -87,12 +86,12 @@ public class ProjectNode extends SingleChildProcessNode {
 
   public static ProjectNode deserialize(ByteBuffer byteBuffer) {
     int size = ReadWriteIOUtils.readInt(byteBuffer);
-    Map<Symbol, Expression> map = new HashMap<>(size);
+    Assignments.Builder assignments = Assignments.builder();
     while (size-- > 0) {
-      map.put(Symbol.deserialize(byteBuffer), 
Expression.deserialize(byteBuffer));
+      assignments.put(Symbol.deserialize(byteBuffer), 
Expression.deserialize(byteBuffer));
     }
     PlanNodeId planNodeId = PlanNodeId.deserialize(byteBuffer);
-    return new ProjectNode(planNodeId, null, new Assignments(map));
+    return new ProjectNode(planNodeId, null, assignments.build());
   }
 
   @Override

Reply via email to