mihailom-db commented on code in PR #45592:
URL: https://github.com/apache/spark/pull/45592#discussion_r1530459134


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala:
##########
@@ -69,10 +69,41 @@ object Literal {
     case f: Float => Literal(f, FloatType)
     case b: Byte => Literal(b, ByteType)
     case s: Short => Literal(s, ShortType)
-    case s: String => Literal(UTF8String.fromString(s), StringType)
-    case s: UTF8String => Literal(s, StringType)
-    case c: Char => Literal(UTF8String.fromString(c.toString), StringType)
-    case ac: Array[Char] => Literal(UTF8String.fromString(String.valueOf(ac)), 
StringType)
+    case s: String =>

Review Comment:
   It will work, but it will break backwards compatibility until we implement 
Casting. All rules only match object StringType for now, but not the class as 
well.



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