-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-30764][SQL] Improve the readability of EXPLAIN FORMATTED style #27509
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,8 +86,8 @@ case class ProjectExec(projectList: Seq[NamedExpression], child: SparkPlan) | |
override def verboseStringWithOperatorId(): String = { | ||
s""" | ||
|(${ExplainUtils.getOpId(this)}) $nodeName ${ExplainUtils.getCodegenId(this)} | ||
|Output : ${projectList.mkString("[", ", ", "]")} | ||
|Input : ${child.output.mkString("[", ", ", "]")} | ||
|${ExplainUtils.generateFieldString("Output", projectList)} | ||
|${ExplainUtils.generateFieldString("Input", child.output)} | ||
""".stripMargin | ||
} | ||
} | ||
|
@@ -243,7 +243,7 @@ case class FilterExec(condition: Expression, child: SparkPlan) | |
override def verboseStringWithOperatorId(): String = { | ||
s""" | ||
|(${ExplainUtils.getOpId(this)}) $nodeName ${ExplainUtils.getCodegenId(this)} | ||
|Input : ${child.output.mkString("[", ", ", "]")} | ||
|${ExplainUtils.generateFieldString("Input", child.output)} | ||
|Condition : ${condition} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove the space before ":"?
|
||
""".stripMargin | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,9 +63,9 @@ case class SortMergeJoinExec( | |
} else "None" | ||
s""" | ||
|(${ExplainUtils.getOpId(this)}) $nodeName ${ExplainUtils.getCodegenId(this)} | ||
|Left keys : ${leftKeys} | ||
|Right keys: ${rightKeys} | ||
|Join condition : ${joinCondStr} | ||
|${ExplainUtils.generateFieldString("Left keys", leftKeys)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might not be related to this PR, but can we do the same thing as https://github.com/apache/spark/pull/27368/files#diff-ddb517fe44ae649ddda3c733c2adcb76R70 for joins? Just for symmetry and future handiness. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I meant creating a trait for all physical joins. It'll make pattern matching easier although we don't have this requirement right now. We could do it in a follow-up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, yea. I just recall the conversation, thanks for your explanation :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR #27595 opened for this follow-up. |
||
|${ExplainUtils.generateFieldString("Right keys", rightKeys)} | ||
|${ExplainUtils.generateFieldString("Join condition", joinCondStr)} | ||
""".stripMargin | ||
} | ||
|
||
|
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.
These changes are only for DSV1. Could we make the corresponding changes when using DSV2? Open the ticket https://issues.apache.org/jira/browse/SPARK-31480
Also, please check the output when the schema is very long. For example, containing 250+ columns.