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

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 66611b1d1c [IOTDB-5513] Fix duplicate LastQueryNode due to change of 
partition slot algorithm (#9040)
66611b1d1c is described below

commit 66611b1d1c9190f3c30e79c1539c6e92e044f3e1
Author: Liao Lanyu <[email protected]>
AuthorDate: Fri Feb 10 19:47:01 2023 +0800

    [IOTDB-5513] Fix duplicate LastQueryNode due to change of partition slot 
algorithm (#9040)
---
 .../src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java    | 1 -
 .../iotdb/db/mpp/plan/planner/distribution/ExchangeNodeAdder.java   | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java 
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
index b869888321..9e31abed80 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
@@ -112,7 +112,6 @@ public class IoTDBSimpleQueryIT {
   }
 
   @Test
-  @Ignore // TODO: Temp ignore this case as it's not worked as our expected
   public void testLastQueryNonCached() {
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/distribution/ExchangeNodeAdder.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/distribution/ExchangeNodeAdder.java
index aedee99555..03f9d7d2c4 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/distribution/ExchangeNodeAdder.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/distribution/ExchangeNodeAdder.java
@@ -445,11 +445,7 @@ public class ExchangeNodeAdder extends 
PlanVisitor<PlanNode, NodeGroupContext> {
     // parent.
     visitedChildren.forEach(
         child -> {
-          // If the child's region is NOT_ASSIGNED, it means the child do not 
belong to any
-          // existing DataRegion. We make it belong to its parent and no 
ExchangeNode will be added.
-          if (context.getNodeDistribution(child.getPlanNodeId()).region
-                  != DataPartition.NOT_ASSIGNED
-              && 
!dataRegion.equals(context.getNodeDistribution(child.getPlanNodeId()).region)) {
+          if 
(!dataRegion.equals(context.getNodeDistribution(child.getPlanNodeId()).region)) 
{
             ExchangeNode exchangeNode =
                 new 
ExchangeNode(context.queryContext.getQueryId().genPlanNodeId());
             exchangeNode.setChild(child);

Reply via email to