stefankandic commented on code in PR #46280:
URL: https://github.com/apache/spark/pull/46280#discussion_r1598427469


##########
sql/api/src/main/scala/org/apache/spark/sql/types/DataType.scala:
##########
@@ -274,6 +288,39 @@ object DataType {
       messageParameters = Map("other" -> compact(render(other))))
   }
 
+  /**
+   * Checks if the current field is in the collation map, and if it is it 
returns
+   * a StringType with the given collation. Otherwise, it further parses its 
type.
+   */
+  private def resolveType(
+      json: JValue,
+      path: String,
+      collationsMap: Map[String, String]): DataType = {
+    collationsMap.get(path) match {
+      case Some(collation) => stringTypeWithCollation(collation)

Review Comment:
   good catch! Added new error class and tests for that case



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

Reply via email to