Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21193#discussion_r189208663
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -259,8 +260,8 @@ trait CodegenSupport extends SparkPlan {
        * them to be evaluated twice.
        */
       protected def evaluateVariables(variables: Seq[ExprCode]): String = {
    -    val evaluate = variables.filter(_.code != 
"").map(_.code.trim).mkString("\n")
    -    variables.foreach(_.code = "")
    +    val evaluate = variables.filter(_.code.toString != 
"").map(_.code.toString).mkString("\n")
    --- End diff --
    
    nit: `_.code.toString.nonEmpty`


---

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

Reply via email to