cloud-fan commented on code in PR #45290: URL: https://github.com/apache/spark/pull/45290#discussion_r1508938251
########## sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala: ########## @@ -33,6 +33,14 @@ class StringType private(val collationId: Int) extends AtomicType with Serializa */ def isDefaultCollation: Boolean = collationId == StringType.DEFAULT_COLLATION_ID + /** + * Binary 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. + * If this field is true, byte level operations can be used against this datatype (e.g. for + * equality and hashing). + */ + def isBinaryCollation: Boolean = CollationFactory.fetchCollation(collationId).isBinaryCollation Review Comment: when shall we treat default collation and binary collation differently? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org