anchovYu commented on code in PR #36241:
URL: https://github.com/apache/spark/pull/36241#discussion_r852263908
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:
##########
@@ -1934,9 +1937,11 @@ abstract class CastBase extends UnaryExpression with
TimeZoneAwareExpression wit
case StringType =>
val doubleStr = ctx.freshVariable("doubleStr", StringType)
(c, evPrim, evNull) =>
+ val dt = ctx.addReferenceObj("doubleType", DoubleType,
DoubleType.getClass.getName)
Review Comment:
BTW according to the comment from Maxim below, I believe we still need to
accept a `DataType` or `AbstractDataType` instead of a pure string as a
parameter to `invalidInputSyntaxForNumericError`, so that we can utilize the
`toSQLType` to format
--
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]