mihailom-db commented on code in PR #48436:
URL: https://github.com/apache/spark/pull/48436#discussion_r1803109281
##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -106,3 +109,20 @@ case object StringType extends StringType(0) {
new StringType(collationId)
}
}
+
+/**
+ * The result type of literals, column definitions without explicit collation,
casts to string
+ * and some expressions that produce strings but whose output type is not
based on the types of its
+ * children.
+ * Idea is to have this behave like a string with the default collation of the
session, but that
+ * we can still differentiate it from a regular string type, because in some
places default string
+ * is not the one with the session collation (e.g. in DDL commands).
+ */
+private[spark] class DefaultStringType extends StringType(0) {
Review Comment:
case object StringType will have collationId = _collationId, where
DefaultStringType will have SQLconf.get.defaultStringType.collationId
--
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]