Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12099#discussion_r58165570
  
    --- 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 --
    
    do we still need this function?



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to