karenfeng commented on a change in pull request #33538:
URL: https://github.com/apache/spark/pull/33538#discussion_r678525859



##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -3,6 +3,34 @@
     "message" : [ "Field name %s is ambiguous and has %s matching fields in 
the struct." ],
     "sqlState" : "42000"
   },
+  "CANNOT_CAST_DATATYPE" : {
+    "message" : [ "Cannot cast %s to %s." ],
+    "sqlState" : "22018"
+  },
+  "CANNOT_CHANGE_DECIMAL_PRECISION" : {
+    "message" : [ "%s cannot be represented as Decimal(%s, %s)." ],
+    "sqlState" : "HY104"

Review comment:
       I believe that HY represents CLI-specific conditions. This seems to be 
triggered by overflows; maybe 22023 is a better fit.




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