You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/09/12 08:29:55 UTC

[PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Ma77Ball opened a new pull request, #58759:
URL: https://github.com/apache/spark/pull/58759

   ### What changes were proposed in this pull request?
   
   Rename the legacy error condition `_LEGACY_ERROR_TEMP_1072` to `TABLES_OR_VIEWS_NOT_IN_SAME_DATABASE` (SQLSTATE `0A000`). It is raised by `SessionCatalog.getTablesByName` when the requested tables/views span more than one database. The message is also reworded for clarity.
   
   ### Why are the changes needed?
   
   The error-conditions README disallows new `_LEGACY_ERROR_TEMP_*` entries and asks existing ones to be resolved. This resolves one (part of SPARK-37935).
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The condition becomes `TABLES_OR_VIEWS_NOT_IN_SAME_DATABASE`, and the message is reworded to "Cannot retrieve tables or views that do not belong to the same database. Requested: <qualifiedTableNames>."
   
   ### How was this patch tested?
   
   Strengthened the existing `SessionCatalogSuite` test to assert the condition and parameters via `checkError` (it previously only intercepted the exception). `SparkThrowableSuite` passes.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Co-authored with Claude Opus 4.8


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4206415802


##########
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:
   Sure, Databricks originated the subclass, but this doesn't necessarily mean that OSS Spark cannot use it. For example, CANNOT_RENAME_ACROSS_SCHEMA already ships 0AKD0 in Spark.
   
   I still prefer 0AKD0 here. 0A000 is the generic "feature not supported" bucket. This is a cross-database restriction on SessionCatalog.getTablesByName, the same shape as a cross-schema rename.
   
   @srielau WDYT? which state for this catalog restriction



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4227014808


##########
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:
   @nchammas ty, I have updated to avoid the double negative and to account for the sqlState change mentioned below. 



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4204546827


##########
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:
   Is 0A000 right here?
   
   0A000 is "feature not supported". This is a same-database restriction on SessionCatalog.getTablesByName, not an unimplemented feature.
   
   CANNOT_RENAME_ACROSS_SCHEMA already uses 0AKD0 ("Cross catalog or schema operation not supported"), which is a closer match. RENAME_TABLE_SOURCE_DESTINATION_DATABASE_MISMATCH uses 3F000. I'd prefer 0AKD0 here unless there is a reason to stay on 0A000.



##########
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:
   let's cc @srielau here ^^



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #58759:
URL: https://github.com/apache/spark/pull/58759#issuecomment-6032499384

   @uros-b friendly ping, PTAL when available. Thanks!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4206243730


##########
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:
   I believe `0AKD0` is specific to Databricks ([link](https://docs.databricks.com/aws/en/error-messages/sqlstates#:~:text=UNSUPPORTED_TIME_PRECISION-,0AKD0,-Cross%20catalog%20or)). 
   
   However, I noticed in the repo that `0AKD0` is used in `error-conditions.json` on line 899:
   ```
     "CANNOT_RENAME_ACROSS_SCHEMA" : {
       "message" : [
         "Renaming a <type> across schemas is not allowed."
       ],
       "sqlState" : "0AKD0"
     },
   ```
   I'm not sure whether this sets a precedent or whether this topic has been discussed before. I am OK with either option and can update the message and sqlState accordingly. 



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4206243730


##########
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:
   I believe `0AKD0` is specific to Databricks ([link](https://docs.databricks.com/aws/en/error-messages/sqlstates#:~:text=UNSUPPORTED_TIME_PRECISION-,0AKD0,-Cross%20catalog%20or)). I also couldn't find any reference to it in the ISO/IEC 9075 standard.
   
   However, I noticed in the repo that `0AKD0` is used in `error-conditions.json` on line 899:
   ```
     "CANNOT_RENAME_ACROSS_SCHEMA" : {
       "message" : [
         "Renaming a <type> across schemas is not allowed."
       ],
       "sqlState" : "0AKD0"
     },
   ```
   I'm not sure whether this sets a precedent or whether this topic has been discussed before. I am OK with either option and can update the message and sqlState accordingly. 



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4206243730


##########
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:
   I believe `0AKD0` is specific to Databricks ([link](https://docs.databricks.com/aws/en/error-messages/sqlstates)). 
   
   However, I noticed in the repo that `0AKD0` is used in `error-conditions.json` on line 899:
   ```
     "CANNOT_RENAME_ACROSS_SCHEMA" : {
       "message" : [
         "Renaming a <type> across schemas is not allowed."
       ],
       "sqlState" : "0AKD0"
     },
   ```
   I'm not sure whether this sets a precedent or whether this topic has been discussed before. I am OK with either option and can update the message and sqlState accordingly. 



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "srielau (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub) via reviews" <re...@spark.apache.org>.
Ma77Ball commented on PR #58759:
URL: https://github.com/apache/spark/pull/58759#issuecomment-6532670569

   @uros-b PTAL when available. 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
nchammas commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4204421035


##########
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:
   Since the error state maps to "feature not supported", I would tweak the message to use that wording.
   
   For example: "Retrieving tables or views from more than one database is not supported. Requested: <qualifiedTableNames>."
   
   This also avoids the double negative of "cannot retrieve ... that do not belong".



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4227010946


##########
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:
   @srielau, thanks for the clarification. @uros-b, I have updated the SQLSTATE to the preferred state: `0AKD0`.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "srielau (via GitHub)" <gi...@apache.org>.
srielau commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4222404058


##########
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:
   "SQL Standard does NOT Have error conditions or SQLCODEs" I think we agree.
   All the SQL Standard has are SQLSTATEs
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #58759:
URL: https://github.com/apache/spark/pull/58759#issuecomment-5821394743

   @uros-b PTAL when available. 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
nchammas commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4204421035


##########
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:
   Since the error state maps to "feature not supported", I would tweak the message to use that wording.
   
   For example: "Retrieving tables or views from more than one database is not supported. Requested: `<qualifiedTableNames>`."
   
   This also avoids the double negative of "cannot retrieve ... that do not belong".



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
nchammas commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4204699312


##########
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:
   `0AKD0` is Databricks-specific, no? It is a closer match, though.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 [spark]

Posted by "srielau (via GitHub)" <gi...@apache.org>.
srielau commented on code in PR #58759:
URL: https://github.com/apache/spark/pull/58759#discussion_r4222404058


##########
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:
   "SQL Standard does NOT Have error conditions or SQLCODEs" I think we agree.
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org