You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2022/04/06 03:39:45 UTC
[iotdb] 03/04: fix the bug in distributionpalnner
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch xingtanzjr/query_execution
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a7ceb4934b7e1f7693261e34ffa18bc64e80faf7
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Wed Apr 6 10:34:09 2022 +0800
fix the bug in distributionpalnner
---
.../org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java | 1 +
.../org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNode.java | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java b/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java
index 06f96f632f..d4d713f1fa 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java
@@ -111,6 +111,7 @@ public class DistributionPlanner {
// SeriesScanNode.
for (RegionReplicaSet dataRegion : dataDistribution) {
SeriesScanNode split = (SeriesScanNode) handle.clone();
+ split.setId(PlanNodeIdAllocator.generateId());
split.setDataRegionReplicaSet(dataRegion);
sources.add(split);
}
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNode.java b/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNode.java
index 91f95c0b68..518ba9a748 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNode.java
@@ -32,7 +32,7 @@ public abstract class PlanNode {
protected static final int ONE_CHILD = 1;
protected static final int CHILD_COUNT_NO_LIMIT = -1;
- private final PlanNodeId id;
+ private PlanNodeId id;
protected PlanNode(PlanNodeId id) {
requireNonNull(id, "id is null");
@@ -43,6 +43,10 @@ public abstract class PlanNode {
return id;
}
+ public void setId(PlanNodeId id) {
+ this.id = id;
+ }
+
public abstract List<PlanNode> getChildren();
public abstract void addChild(PlanNode child);