[
https://issues.apache.org/jira/browse/DRILL-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505468#comment-16505468
]
ASF GitHub Bot commented on DRILL-6476:
---------------------------------------
kkhatua commented on a change in pull request #1308: DRILL-6476: Generate
explain plan which shows relation between Latera…
URL: https://github.com/apache/drill/pull/1308#discussion_r193917068
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/explain/NumberingRelWriter.java
##########
@@ -125,14 +131,56 @@ protected void explain_(
}
pw.println(s);
spacer.add(2);
- explainInputs(inputs);
+ explainInputs(rel);
spacer.subtract(2);
}
- private void explainInputs(List<RelNode> inputs) {
- for (RelNode input : inputs) {
- input.explain(this);
+ private String getDependentSrcOp(RelNode rel) {
+ if (rel instanceof UnnestPrel) {
+ return this.getDependentSrcOp((UnnestPrel) rel);
}
+ return "";
+ }
+
+ private String getDependentSrcOp(UnnestPrel unnest) {
+ Prel parent = this.getRegisteredPrel(unnest.getParentClass());
+ if (parent != null && parent instanceof CorrelatePrel) {
+ OpId id = ids.get(parent);
+ return String.format(" [SrcOp: (%02d-%02d)] ", id.fragmentId, id.opId);
Review comment:
Can you change this to
```java
return String.format(" [srcOp=%02d-%02d] ", id.fragmentId, id.opId);
```
It makes it easier to use regex and extract the operator Id with JavaScript
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Generate explain plan which shows relation between Lateral and the
> corresponding Unnest.
> ----------------------------------------------------------------------------------------
>
> Key: DRILL-6476
> URL: https://issues.apache.org/jira/browse/DRILL-6476
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.14.0
> Reporter: Hanumath Rao Maduri
> Assignee: Hanumath Rao Maduri
> Priority: Major
>
> Currently, explain plan doesn't show that which lateral and unnest node's
> are related. This information is good to have so that the visual plan can use
> it and show the relation visually.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)