cloud-fan commented on code in PR #48883:
URL: https://github.com/apache/spark/pull/48883#discussion_r1848434976
##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -82,8 +84,12 @@ class StringType private (val collationId: Int) extends
AtomicType with Serializ
// the collation information is written to struct field metadata
override def jsonValue: JValue = JString("string")
- override def equals(obj: Any): Boolean =
- obj.isInstanceOf[StringType] && obj.asInstanceOf[StringType].collationId
== collationId
+ override def equals(obj: Any): Boolean = {
+ obj match {
+ case s: StringType => s.collationId == collationId && s.maxLength ==
maxLength
Review Comment:
We should exclude char/varchar here.
--
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]