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

   ### What changes were proposed in this pull request?
   
   Assign the name `TABLE_DATABASE_NOT_SPECIFIED` to the legacy error condition 
`_LEGACY_ERROR_TEMP_1080`.
   This error is raised by 
`QueryCompilationErrors.tableNotSpecifyDatabaseError`, called from 
`CatalogTable.database`, when a table's identifier did not specify a database.
   The new condition is assigned SQLSTATE `42601` (matching the sibling 
condition `TABLE_LOCATION_URI_NOT_SPECIFIED` from SPARK-58349); the message 
text and parameters remain unchanged.
   
   ### Why are the changes needed?
   
   The error conditions guidelines 
(`common/utils/src/main/resources/error/README.md`) disallow new 
`_LEGACY_ERROR_TEMP_*` entries and require existing ones to be assigned proper 
names. This resolves one of them under the umbrella 
[SPARK-37935](https://issues.apache.org/jira/browse/SPARK-37935).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. The `_LEGACY_ERROR_TEMP_*` names are internal. The error condition name 
changes to `TABLE_DATABASE_NOT_SPECIFIED` and now reports standard SQLSTATE 
`42601`; the rendered message ("Table `<identifier>` did not specify 
database.") is unchanged.
   
   ### How was this patch tested?
   
   Added a `checkError` test in `QueryCompilationErrorsSuite` that constructs a 
`CatalogTable` without a specified database in its identifier and asserts the 
`TABLE_DATABASE_NOT_SPECIFIED` condition when `database` is accessed.
   Validated `common/utils/src/main/resources/error/error-conditions.json` 
syntax, alphabetical sorting, and line-length constraints.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.
   


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