MaxGekk commented on a change in pull request #20176:
URL: https://github.com/apache/spark/pull/20176#discussion_r462546349



##########
File path: 
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("[")

Review comment:
       Are there any reasons for using the same brackets `[]` for Struct, Map 
and Array?
   
   How about `[]` for arrays, `{}` for structs and `<>` for maps or somehow 
distinguish them. At least, it is not consistent with `toHiveString` which 
prints `{}` for structs and maps. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to