-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support EXPLAIN ANALYZE in table model #14189
Conversation
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14189 +/- ##
============================================
- Coverage 39.64% 39.61% -0.03%
Complexity 71 71
============================================
Files 4232 4232
Lines 269637 269870 +233
Branches 32688 32719 +31
============================================
+ Hits 106897 106922 +25
- Misses 162740 162948 +208 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Quality Gate passedIssues Measures |
@@ -156,6 +159,12 @@ public List<PlanNode> visitOutput(OutputNode node, PlanContext context) { | |||
return Collections.singletonList(node); | |||
} | |||
|
|||
@Override | |||
public List<PlanNode> visitExplainAnalyze(ExplainAnalyzeNode node, PlanContext context) { | |||
symbolAllocator.newSymbol(ColumnHeaderConstant.EXPLAIN_ANALYZE, StringType.getInstance()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call symbolAllocator.newSymbol
in logical planner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call genResult for its children
@Override | ||
public List<Symbol> getOutputSymbols() { | ||
return Collections.singletonList(Symbol.of(ColumnHeaderConstant.EXPLAIN_ANALYZE)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a new ExplainAnalyzeNode for table model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And record outputSymbols which are generated by SymbolAllocator in that new node
@@ -751,7 +752,7 @@ public TsBlock constructResultForMemorySource(MPPQueryContext context) { | |||
|
|||
@Override | |||
public boolean isQuery() { | |||
return false; | |||
return getStatement().isQuery(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
record whether it is query in analysis while analyzing, delete isQuery method in Statement
// 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())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change back
@@ -120,6 +121,23 @@ public PlanNode visitTableDeviceQueryCount( | |||
return processTableDeviceSourceNode(node, context); | |||
} | |||
|
|||
@Override | |||
public PlanNode visitExplainAnalyze( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add NOT_ASSIGNED region for ExplainAnalyzeNode
As the title