karenfeng commented on a change in pull request #32850:
URL: https://github.com/apache/spark/pull/32850#discussion_r655592044
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -0,0 +1,22 @@
+{
+ "DIVIDE_BY_ZERO_ERROR" : {
+ "sqlState" : "22012",
+ "messageFormatLines" : [ "divide by zero" ]
+ },
+ "DUPLICATE_KEY_ERROR" : {
+ "sqlState" : "23000",
+ "messageFormatLines" : [ "Found duplicate keys '%s'" ]
+ },
Review comment:
We can add `vendorCode` in the future, but I think we would need to
determine how error codes should be defined - whether there should be a class
hierarchy, if they should be arbitrary, or something else (eg. hashed from the
error class). There are some clients that except the vendor code to match [Hive
error code classes](https://issues.apache.org/jira/browse/HIVE-3001), given
that they are thrown within a `HiveSQLException`.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]