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

    https://github.com/apache/spark/pull/19730#discussion_r150419888
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -1015,7 +1015,9 @@ case class Cast(child: Expression, dataType: 
DataType, timeZoneId: Option[String
         }
         val rowClass = classOf[GenericInternalRow].getName
         val result = ctx.freshName("result")
    +    ctx.addMutableState(s"$rowClass", result, "")
    --- End diff --
    
    I think that since we not assigning it, we might keep it as a local 
variable and pass it to the generated methods. In this way we can avoid to 
introduce new global variables. Have you tried that?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to