Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/12099#discussion_r58254140
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala ---
@@ -81,29 +100,11 @@ package object debug {
* WholeStageCodegen subtree).
*/
def debugCodegen(): Unit = {
- debugPrint(debugCodegenString())
+ debugPrint(codegenString(query.queryExecution.executedPlan))
}
/** Visible for testing. */
- def debugCodegenString(): String = {
- val plan = query.queryExecution.executedPlan
- val codegenSubtrees = new
collection.mutable.HashSet[WholeStageCodegen]()
- plan transform {
- case s: WholeStageCodegen =>
- codegenSubtrees += s
- s
- case s => s
- }
- var output = s"Found ${codegenSubtrees.size} WholeStageCodegen
subtrees.\n"
- for ((s, i) <- codegenSubtrees.toSeq.zipWithIndex) {
- output += s"== Subtree ${i + 1} / ${codegenSubtrees.size} ==\n"
- output += s
- output += "\nGenerated code:\n"
- val (_, source) = s.doCodeGen()
- output += s"${CodeFormatter.format(source)}\n"
- }
- output
- }
+ def debugCodegenString(): String =
codegenString(query.queryExecution.executedPlan)
--- End diff --
yea let's change that
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]