stefankandic commented on code in PR #46083:
URL: https://github.com/apache/spark/pull/46083#discussion_r1568617954
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/util/SchemaUtils.scala:
##########
@@ -303,4 +303,35 @@ private[spark] object SchemaUtils {
case _ => false
}
}
+
+ /**
+ * Replaces any collated string type with non collated StringType
+ * recursively in the given schema.
+ */
+ def replaceCollatedStringWithStringInSchema(schema: StructType): StructType
= {
+ StructType(schema.map { field =>
+ if (hasNonBinarySortableCollatedString(field.dataType)) {
Review Comment:
i'm not a fan of the name `hasNonBinarySortableCollatedString`, but that
method does what you described.
It will check if a collation `supportsBinaryEquality` => if id == 0
--
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]