nikolamand-db commented on code in PR #45933:
URL: https://github.com/apache/spark/pull/45933#discussion_r1567081690
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2871,7 +2872,7 @@ case class ToBinary(
errorSubClass = "NON_FOLDABLE_INPUT",
messageParameters = Map(
"inputName" -> toSQLId("fmt"),
- "inputType" -> toSQLType(StringType),
+ "inputType" -> toSQLType(StringTypeAnyCollation),
Review Comment:
Template for `INVALID_ARG_VALUE`:
https://github.com/apache/spark/blob/dd4c7fc6ae91ec1f2a348cf4633bff10717cde22/common/utils/src/main/resources/error/error-classes.json#L746
Template for `NON_FOLDABLE_INPUT`:
https://github.com/apache/spark/blob/dd4c7fc6ae91ec1f2a348cf4633bff10717cde22/common/utils/src/main/resources/error/error-classes.json#L806
In case of `INVALID_ARG_VALUE`, the `inputValue` should be what the input
data type is, in this case `f.dataType`, while in case of `NON_FOLDABLE_INPUT`,
`inputType` is what we're expecting and that's `StringTypeAnyCollation`.
--
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]