stefankandic commented on code in PR #46083:
URL: https://github.com/apache/spark/pull/46083#discussion_r1568622375
##########
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, but that is what the function will actually do.
It will check if the collation `supportsBinaryOrdering` which only UTF8_BINARY
collation does
--
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]