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

    https://github.com/apache/spark/pull/21222#discussion_r185981329
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala ---
    @@ -88,23 +100,62 @@ package object debug {
         }
       }
     
    +  /**
    +   * Get WholeStageCodegenExec subtrees and the codegen in a query plan 
into one String
    +   *
    +   * @param query the streaming query for codegen
    +   * @return single String containing all WholeStageCodegen subtrees and 
corresponding codegen
    +   */
    +  def codegenString(query: StreamingQuery): String = {
    +    val msg = query match {
    +      case w: StreamExecution if w.lastExecution != null =>
    --- End diff --
    
    I think this can be rewritten as if `case w: StreamExecution => if 
(w.lastExecution != null) ... else ...` 


---

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

Reply via email to