dbatomic commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1519561653
########## sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala: ########## @@ -41,14 +41,22 @@ class StringType private(val collationId: Int) extends AtomicType with Serializa */ def isBinaryCollation: Boolean = CollationFactory.fetchCollation(collationId).isBinaryCollation + /** + * Returns whether the collation is indeterminate. An indeterminate collation is + * a result of combination of conflicting non-default implicit collations. + */ + def isIndeterminateCollation: Boolean = collationId == CollationFactory.INDETERMINATE_COLLATION_ID + /** * Type name that is shown to the customer. * If this is an UCS_BASIC collation output is `string` due to backwards compatibility. */ override def typeName: String = if (isDefaultCollation) "string" + else if (isIndeterminateCollation) s"string COLLATE INDETERMINATE_COLLATION" else s"string COLLATE ${CollationFactory.fetchCollation(collationId).collationName}" Review Comment: This change will require changes on PySpark side. -- 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