This is an automated email from the ASF dual-hosted git repository. hui pushed a commit to branch lmh/TypeProviderOpt in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 17dbab6890cb6b42806c00bdd4b06894a176cc1f Author: Minghui Liu <[email protected]> AuthorDate: Wed Sep 7 18:36:39 2022 +0800 bug fix --- .../db/mpp/plan/planner/SubPlanTypeExtractor.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/SubPlanTypeExtractor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/SubPlanTypeExtractor.java index 0c78183794..be33a8000a 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/SubPlanTypeExtractor.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/SubPlanTypeExtractor.java @@ -19,9 +19,12 @@ package org.apache.iotdb.db.mpp.plan.planner; +import org.apache.iotdb.db.metadata.path.AlignedPath; import org.apache.iotdb.db.mpp.plan.analyze.TypeProvider; import org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode; import org.apache.iotdb.db.mpp.plan.planner.plan.node.SimplePlanVisitor; +import org.apache.iotdb.db.mpp.plan.planner.plan.node.source.AlignedSeriesAggregationScanNode; +import org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesAggregationScanNode; public class SubPlanTypeExtractor { @@ -50,5 +53,23 @@ public class SubPlanTypeExtractor { } return null; } + + @Override + public Void visitSeriesAggregationScan(SeriesAggregationScanNode node, Void context) { + String sourcePath = node.getSeriesPath().getFullPath(); + typeProvider.setType(sourcePath, allTypes.getType(sourcePath)); + return visitPlan(node, context); + } + + @Override + public Void visitAlignedSeriesAggregationScan( + AlignedSeriesAggregationScanNode node, Void context) { + AlignedPath alignedPath = node.getAlignedPath(); + for (int i = 0; i < alignedPath.getColumnNum(); i++) { + String sourcePath = alignedPath.getPathWithMeasurement(i).getFullPath(); + typeProvider.setType(sourcePath, allTypes.getType(sourcePath)); + } + return visitPlan(node, context); + } } }
