yaooqinn commented on code in PR #48986:
URL: https://github.com/apache/spark/pull/48986#discussion_r1860473254


##########
sql/api/src/main/scala/org/apache/spark/sql/types/StructType.scala:
##########
@@ -433,7 +433,8 @@ case class StructType(fields: Array[StructField]) extends 
DataType with Seq[Stru
     stringConcat.append("struct<")
     var i = 0
     while (i < len) {
-      
stringConcat.append(s"${fields(i).name}:${fields(i).dataType.catalogString}")
+      val name = QuotingUtils.quoteIfNeeded(fields(i).name)
+      stringConcat.append(s"$name:${fields(i).dataType.catalogString}")

Review Comment:
   Also, cc @cloud-fan. If this is the right option to go with, shall we create 
a variant for the `catalogString` method to minimize the impact?



-- 
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.

To unsubscribe, e-mail: [email protected]

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