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


##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -41,12 +37,22 @@ class StringType private(val collationId: Int) extends 
AtomicType with Serializa
    */
   def isBinaryCollation: Boolean = 
CollationFactory.fetchCollation(collationId).isBinaryCollation
 
+  /**
+   * Spark internal collation implies that strings are considered equal only 
if they are
+   * byte for byte equal. E.g. all accent or case-insensitive collations are 
considered non-binary.
+   * Also their comparison does not require ICU library calls, as ordering 
follows
+   * spark internal implementation. If this field is true, byte level 
operations can be
+   * used against this datatype (e.g. for equality, hashing and sorting).
+   */
+  def isUTF8BinaryCollation: Boolean =

Review Comment:
   so this is a special case of binary collation?



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