cloud-fan commented on code in PR #48962:
URL: https://github.com/apache/spark/pull/48962#discussion_r1860103304


##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -75,7 +75,13 @@ class StringType private (val collationId: Int) extends 
AtomicType with Serializ
    */
   override def typeName: String =
     if (isUTF8BinaryCollation) "string"
-    else s"string collate 
${CollationFactory.fetchCollation(collationId).collationName}"
+    else s"string collate $collationName"
+
+  override def toString: String =
+    if (isUTF8BinaryCollation) "StringType"
+    else s"StringType($collationName)"
+
+  def collationName: String = 
CollationFactory.fetchCollation(collationId).collationName

Review Comment:
   let's be careful for adding a new public API. We can mark it as 
`private[sql]` first.



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