srielau commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4207526555


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -8146,6 +8146,12 @@
     },
     "sqlState" : "42601"
   },
+  "TABLES_OR_VIEWS_NOT_IN_SAME_DATABASE" : {
+    "message" : [
+      "Cannot retrieve tables or views that do not belong to the same 
database. Requested: <qualifiedTableNames>."
+    ],
+    "sqlState" : "0A000"

Review Comment:
   Correct, from day one we have been using SQLSTATEs outside those listed in 
the SQL standard, which have been popularized by other vendors. The goal of 0AK 
vs 0AKD, was to minimize conflicts. Once a SQLSTATE has been assigned, 
everything speaks for reusing it, as long as we are faithful in its meaning.
   That being said, we must remember that the SQL Standard does NOT Have error 
conditions or SQLCODEs. So our need to differentiate between different kinds of 
0A*** is largely mitigated by being able to go all in with error condition 
names.
   As such, I would not consider the debate of 0A000 vs 0AKD0 vs 0AK00 as 
fundamenmtal.
   The finer the SQLSTATE, the easier it is to collect metrics on a set of 
condition.



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