This is an automated email from the ASF dual-hosted git repository.
ycycse pushed a commit to branch RefactorEA
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/RefactorEA by this push:
new c795ec5696e set NOT_ASSIGNED region to ExplainAnalyzeNode
c795ec5696e is described below
commit c795ec5696ed2b424fe515239d074351ea7c593b
Author: YangCaiyin <[email protected]>
AuthorDate: Tue Nov 26 14:33:46 2024 +0800
set NOT_ASSIGNED region to ExplainAnalyzeNode
---
.../planner/distribute/AddExchangeNodes.java | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/AddExchangeNodes.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/AddExchangeNodes.java
index 03e84d69982..7b7b4f3b7df 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/AddExchangeNodes.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/AddExchangeNodes.java
@@ -20,6 +20,7 @@
package org.apache.iotdb.db.queryengine.plan.relational.planner.distribute;
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+import org.apache.iotdb.commons.partition.DataPartition;
import org.apache.iotdb.db.queryengine.common.MPPQueryContext;
import
org.apache.iotdb.db.queryengine.plan.planner.distribution.NodeDistribution;
import
org.apache.iotdb.db.queryengine.plan.planner.plan.node.ExplainAnalyzeNode;
@@ -33,6 +34,7 @@ import
org.apache.iotdb.db.queryengine.plan.relational.planner.node.schema.Table
import
org.apache.iotdb.db.queryengine.plan.relational.planner.node.schema.TableDeviceQueryCountNode;
import
org.apache.iotdb.db.queryengine.plan.relational.planner.node.schema.TableDeviceQueryScanNode;
+import static
org.apache.iotdb.db.queryengine.plan.planner.distribution.NodeDistributionType.DIFFERENT_FROM_ALL_CHILDREN;
import static
org.apache.iotdb.db.queryengine.plan.planner.distribution.NodeDistributionType.SAME_WITH_ALL_CHILDREN;
import static
org.apache.iotdb.db.queryengine.plan.planner.distribution.NodeDistributionType.SAME_WITH_SOME_CHILD;
@@ -59,14 +61,14 @@ public class AddExchangeNodes
PlanNode newNode = node.clone();
if (node.getChildren().size() == 1) {
newNode.addChild(node.getChildren().get(0).accept(this, context));
- // Explain Analyze doesn't have region info, this may be solved by a
local RegionReplicaSet
- NodeDistribution childRegion =
-
context.nodeDistributionMap.get(node.getChildren().get(0).getPlanNodeId());
- if (childRegion != null) {
- context.nodeDistributionMap.put(
- node.getPlanNodeId(),
- new NodeDistribution(SAME_WITH_ALL_CHILDREN,
childRegion.getRegion()));
- }
+ context.nodeDistributionMap.put(
+ node.getPlanNodeId(),
+ new NodeDistribution(
+ SAME_WITH_ALL_CHILDREN,
+ context
+ .nodeDistributionMap
+ .get(node.getChildren().get(0).getPlanNodeId())
+ .getRegion()));
return newNode;
}
@@ -134,6 +136,9 @@ public class AddExchangeNodes
exchangeNode.setOutputSymbols(child.getOutputSymbols());
newNode.setChild(exchangeNode);
+ context.nodeDistributionMap.put(
+ newNode.getPlanNodeId(),
+ new NodeDistribution(DIFFERENT_FROM_ALL_CHILDREN,
DataPartition.NOT_ASSIGNED));
context.hasExchangeNode = true;
return newNode;
}