gengliangwang commented on code in PR #36553:
URL: https://github.com/apache/spark/pull/36553#discussion_r875430655
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -22,8 +22,12 @@
"CANNOT_UP_CAST_DATATYPE" : {
"message" : [ "Cannot up cast <value> from <sourceType> to
<targetType>.\n<details>" ]
},
- "CAST_CAUSES_OVERFLOW" : {
- "message" : [ "Casting <value> to <type> causes overflow. To return NULL
instead, use 'try_cast'. If necessary set <config> to false to bypass this
error." ],
+ "CAST_INVALID_INPUT" : {
+ "message" : [ "The value <value> of the type <sourceType> cannot be cast
to <targetType> because it is malformed. To return NULL instead, use
`try_cast`. If necessary set <config> to false to bypass this error.<details>"
],
+ "sqlState" : "42000"
+ },
+ "CAST_OVERFLOW" : {
+ "message" : [ "The value <value> of the type <sourceType> cannot be cast
to <targetType> due to an overflow. To return NULL instead, use `try_cast`. If
necessary set <config> to false to bypass this error." ],
Review Comment:
+1 we should have the context here 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]