gatorsmile opened a new pull request, #57537: URL: https://github.com/apache/spark/pull/57537
### What changes were proposed in this pull request? Assign the name `TABLE_LOCATION_URI_NOT_SPECIFIED` to the legacy error condition `_LEGACY_ERROR_TEMP_1081`. This error is raised by `QueryCompilationErrors.tableNotSpecifyLocationUriError`, called from `CatalogTable.location`, when a table's storage `locationUri` is absent. The new condition is given SQLSTATE `42601`; the message text and the `identifier` parameter are unchanged. ### Why are the changes needed? The error conditions [README](https://github.com/apache/spark/blob/master/common/utils/src/main/resources/error/README.md) disallows new `_LEGACY_ERROR_TEMP_*` entries and asks 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 not part of the public API. The error condition name changes to `TABLE_LOCATION_URI_NOT_SPECIFIED` and now reports SQLSTATE `42601`; the rendered message ("Table `<identifier>` did not specify locationUri.") is unchanged. ### How was this patch tested? Added a `checkError` test in `QueryCompilationErrorsSuite` that constructs a `CatalogTable` with empty storage and asserts the `TABLE_LOCATION_URI_NOT_SPECIFIED` condition when `location` is accessed. `SparkThrowableSuite` validates error-file formatting/sorting and that non-legacy conditions carry a SQLSTATE. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (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: [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]
