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

    https://github.com/apache/spark/pull/21537#discussion_r202582231
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -720,31 +719,36 @@ case class Cast(child: Expression, dataType: 
DataType, timeZoneId: Option[String
       private def writeMapToStringBuilder(
           kt: DataType,
           vt: DataType,
    -      map: String,
    -      buffer: String,
    -      ctx: CodegenContext): String = {
    +      map: ExprValue,
    +      buffer: ExprValue,
    +      ctx: CodegenContext): Block = {
     
         def dataToStringFunc(func: String, dataType: DataType) = {
           val funcName = ctx.freshName(func)
           val dataToStringCode = castToStringCode(dataType, ctx)
    +      val data = JavaCode.variable("data", dataType)
    +      val dataStr = JavaCode.variable("dataStr", StringType)
           ctx.addNewFunction(funcName,
    --- End diff --
    
    Ok. Sounds good. Will update later.


---

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

Reply via email to