cloud-fan commented on code in PR #36241:
URL: https://github.com/apache/spark/pull/36241#discussion_r851891371
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -102,13 +102,13 @@
"message" : [ "The fraction of sec must be zero. Valid range is [0, 60].
If necessary set %s to false to bypass this error. " ],
"sqlState" : "22023"
},
- "INVALID_INPUT_SYNTAX_FOR_NUMERIC_TYPE" : {
- "message" : [ "invalid input syntax for type numeric: %s. To return NULL
instead, use 'try_cast'. If necessary set %s to false to bypass this error.%s"
],
- "sqlState" : "42000"
- },
"INVALID_JSON_SCHEMA_MAPTYPE" : {
"message" : [ "Input schema %s can only contain StringType as a key type
for a MapType." ]
},
+ "INVALID_LITERAL_FORMAT_FOR_CAST" : {
+ "message" : [ "Invalid %s literal: %s. To return NULL instead, use
'try_cast'. If necessary set %s to false to bypass this error.%s" ],
Review Comment:
Is cast input always a literal? I think `Invalid input value for type %s:
'%s'. To return NULL ...`
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -102,13 +102,13 @@
"message" : [ "The fraction of sec must be zero. Valid range is [0, 60].
If necessary set %s to false to bypass this error. " ],
"sqlState" : "22023"
},
- "INVALID_INPUT_SYNTAX_FOR_NUMERIC_TYPE" : {
- "message" : [ "invalid input syntax for type numeric: %s. To return NULL
instead, use 'try_cast'. If necessary set %s to false to bypass this error.%s"
],
- "sqlState" : "42000"
- },
"INVALID_JSON_SCHEMA_MAPTYPE" : {
"message" : [ "Input schema %s can only contain StringType as a key type
for a MapType." ]
},
+ "INVALID_LITERAL_FORMAT_FOR_CAST" : {
+ "message" : [ "Invalid %s literal: %s. To return NULL instead, use
'try_cast'. If necessary set %s to false to bypass this error.%s" ],
Review Comment:
Is cast input always a literal? I think `Invalid input value for type %s:
%s. To return NULL ...`
--
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]