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


##########
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 think `binarySortable` is not the property we are looking for. We need to 
fine collation id != 0, according to how `StringType.typeName` is implemented.



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