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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ToStringBase.scala:
##########
@@ -256,11 +258,11 @@ trait ToStringBase { self: UnaryExpression with 
TimeZoneAwareExpression =>
       // as strings. Otherwise, the casting is using `BigDecimal.toString` 
which may use scientific
       // notation if an exponent is needed.
       case _: DecimalType if useDecimalPlainString =>
-        (c, evPrim) => code"$evPrim = 
UTF8String.fromString($c.toPlainString());"
-      case StringType =>
+        (c, evPrim) => code"$evPrim = 
UTF8String.fromString($c.toPlainString(), $collationId);"
+      case _: StringType =>
         (c, evPrim) => code"$evPrim = $c;"

Review Comment:
   this needs collationId as well, right?



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