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

    https://github.com/apache/spark/pull/20176#discussion_r160307985
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -259,6 +259,29 @@ case class Cast(child: Expression, dataType: DataType, 
timeZoneId: Option[String
             builder.append("]")
             builder.build()
           })
    +    case StructType(fields) =>
    +      buildCast[InternalRow](_, row => {
    +        val builder = new UTF8StringBuilder
    +        builder.append("[")
    +        if (row.numFields > 0) {
    --- End diff --
    
    do we need this? even `row.numFields == 0`, the following code is a no-op


---

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

Reply via email to