nchammas commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4209807279
##########
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:
Yes, the [`0A` error class][1] is appropriate, and the sub-class is not as
important to get exactly right. I think `0AKD0` is a good choice, too.
[1]:
https://github.com/apache/spark/blob/29b60f527793f4ca0ce1f2a616fc1fdca409d32c/common/utils/src/main/resources/error/error-classes.json#L9
> the SQL Standard does NOT Have error conditions or SQLCODEs
Side point but: Did you mean to say SQLSTATE instead of SQLCODE here?
SQLCODE is a deprecated part of the SQL standard. SQLSTATE is a different
thing (which maps to our [error states][3]), and the standard very much [_does_
have SQLSTATEs][2] (search for "Table_23").
[2]: https://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
[3]:
https://github.com/apache/spark/blob/29b60f527793f4ca0ce1f2a616fc1fdca409d32c/common/utils/src/main/resources/error/error-states.json
--
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]