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

hui pushed a commit to branch lmh/planOpt
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 5590a67254cf27036dc6ed1106826095e46fa8ac
Author: Minghui Liu <[email protected]>
AuthorDate: Mon Oct 31 10:15:26 2022 +0800

    add test
---
 .../apache/iotdb/db/mpp/plan/plan/QueryLogicalPlanUtil.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/QueryLogicalPlanUtil.java
 
b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/QueryLogicalPlanUtil.java
index b1eed72479..43c2420f3c 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/QueryLogicalPlanUtil.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/QueryLogicalPlanUtil.java
@@ -153,7 +153,7 @@ public class QueryLogicalPlanUtil {
 
   /* Simple Query */
   static {
-    String sql = "SELECT ** FROM root.sg.d2 LIMIT 10 OFFSET 10";
+    String sql = "SELECT ** FROM root.sg.d2 WHERE time > 100 LIMIT 10 OFFSET 
10";
 
     QueryId queryId = new QueryId("test");
     List<PlanNode> sourceNodeList = new ArrayList<>();
@@ -175,6 +175,15 @@ public class QueryLogicalPlanUtil {
     sourceNodeList.add(
         new AlignedSeriesScanNode(
             queryId.genPlanNodeId(), (AlignedPath) 
schemaMap.get("root.sg.d2.a"), Ordering.ASC));
+
+    for (PlanNode sourceNode : sourceNodeList) {
+      if (sourceNode instanceof SeriesScanNode) {
+        ((SeriesScanNode) sourceNode).setTimeFilter(TimeFilter.gt(100));
+      } else if (sourceNode instanceof AlignedSeriesScanNode) {
+        ((AlignedSeriesScanNode) sourceNode).setTimeFilter(TimeFilter.gt(100));
+      }
+    }
+
     TimeJoinNode timeJoinNode =
         new TimeJoinNode(queryId.genPlanNodeId(), Ordering.ASC, 
sourceNodeList);
     OffsetNode offsetNode = new OffsetNode(queryId.genPlanNodeId(), 
timeJoinNode, 10);

Reply via email to