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

    https://github.com/apache/spark/pull/20024#discussion_r159681507
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -597,6 +619,44 @@ case class Cast(child: Expression, dataType: DataType, 
timeZoneId: Option[String
         """
       }
     
    +  private[this] def codegenWriteArrayElemCode(et: DataType, ctx: 
CodegenContext): String = {
    --- End diff --
    
    oh wait, the returned function is only called once, I think we don't need 
to make it a function, but just return the code, e.g.
    ```
    def writeArrayToStringBuilder(ctx: CodegenContext, et: DataType, arr: 
String, builder: String): String
    ```


---

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

Reply via email to