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

    https://github.com/apache/spark/pull/19797#discussion_r152719412
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -799,9 +799,11 @@ case class Cast(child: Expression, dataType: DataType, 
timeZoneId: Option[String
     
       private[this] def castToByteCode(from: DataType, ctx: CodegenContext): 
CastFunction = from match {
         case StringType =>
    -      val wrapper = ctx.freshName("wrapper")
    -      ctx.addMutableState("UTF8String.IntWrapper", wrapper,
    -        s"$wrapper = new UTF8String.IntWrapper();")
    +      val wrapper = "intWrapper"
    --- End diff --
    
    Should we worry about name collision?


---

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

Reply via email to