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 88aafea4ff9 Fix serialize method of limit and offset
88aafea4ff9 is described below

commit 88aafea4ff9b0afa6309519dcfc9f3294c637455
Author: Beyyes <[email protected]>
AuthorDate: Thu Jul 25 12:18:56 2024 +0800

    Fix serialize method of limit and offset
---
 .../iotdb/db/queryengine/plan/relational/planner/node/LimitNode.java    | 2 +-
 .../iotdb/db/queryengine/plan/relational/planner/node/OffsetNode.java   | 2 +-
 .../iotdb/db/queryengine/plan/relational/analyzer/AnalyzerTest.java     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/LimitNode.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/LimitNode.java
index 8e7b0292b0a..f99a250f69d 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/LimitNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/LimitNode.java
@@ -80,7 +80,7 @@ public class LimitNode extends SingleChildProcessNode {
   }
 
   public static LimitNode deserialize(ByteBuffer byteBuffer) {
-    long count = ReadWriteIOUtils.read(byteBuffer);
+    long count = ReadWriteIOUtils.readLong(byteBuffer);
     PlanNodeId planNodeId = PlanNodeId.deserialize(byteBuffer);
     return new LimitNode(planNodeId, null, count, null);
   }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/OffsetNode.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/OffsetNode.java
index fc363190d2b..ba2f84418fe 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/OffsetNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/OffsetNode.java
@@ -66,7 +66,7 @@ public class OffsetNode extends SingleChildProcessNode {
   }
 
   public static OffsetNode deserialize(ByteBuffer byteBuffer) {
-    long count = ReadWriteIOUtils.read(byteBuffer);
+    long count = ReadWriteIOUtils.readLong(byteBuffer);
     PlanNodeId planNodeId = PlanNodeId.deserialize(byteBuffer);
     return new OffsetNode(planNodeId, null, count);
   }
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AnalyzerTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AnalyzerTest.java
index 6a08a6c6e5b..63a6f43bca0 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AnalyzerTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AnalyzerTest.java
@@ -630,7 +630,7 @@ public class AnalyzerTest {
     assertTrue(rootNode.getChildren().get(0).getChildren().get(0) instanceof 
FilterNode);
     filterNode = (FilterNode) 
rootNode.getChildren().get(0).getChildren().get(0);
     assertEquals(
-        "((\"tag1\" IN \"tag1\") AND (NOT (\"tag2\" IN \"tag2\")))",
+        "((\"tag1\" IN ('A', 'B')) AND (NOT (\"tag2\" IN ('A', 'C'))))",
         filterNode.getPredicate().toString());
     assertTrue(
         rootNode.getChildren().get(0).getChildren().get(0).getChildren().get(0)

Reply via email to