cloud-fan commented on a change in pull request #32365:
URL: https://github.com/apache/spark/pull/32365#discussion_r657949081



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -307,7 +307,11 @@ abstract class CastBase extends UnaryExpression with 
TimeZoneAwareExpression wit
 
   private val legacyCastToStr = 
SQLConf.get.getConf(SQLConf.LEGACY_COMPLEX_TYPES_TO_STRING)
   // The brackets that are used in casting structs and maps to strings
-  private val (leftBracket, rightBracket) = if (legacyCastToStr) ("[", "]") 
else ("{", "}")
+  protected def leftBracket = if (legacyCastToStr) "[" else "{"
+  protected def rightBracket = if (legacyCastToStr) "]" else "}"
+  protected def elementSpace = " "

Review comment:
       BTW does it really matter? In TRANSFORM what happens if we add a space 
between elements? Hive serde fails to parse it?




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