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


##########
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 don't think this is future-proof. I think it's better to write new code to 
explicitly check `collationId != 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]

Reply via email to