Ma77Ball opened a new pull request, #59068: URL: https://github.com/apache/spark/pull/59068
### What changes were proposed in this pull request? This PR assigns a proper name to the legacy error condition `_LEGACY_ERROR_TEMP_1079`, renaming it to `UNSUPPORTED_RESOURCE_TYPE_FOR_FUNCTION` (SQLSTATE `0A000`), as part of SPARK-37935 (migrate onto error classes). The condition is thrown by `QueryCompilationErrors.resourceTypeNotSupportedError`, raised when a function resource is loaded with a type other than `jar`, `file`, or `archive`. The message is reworded from `Resource Type '<resourceType>' is not supported.` to `Unsupported resource type '<resourceType>' for a function.` ### Why are the changes needed? `_LEGACY_ERROR_TEMP_*` conditions are placeholders without stable, meaningful names. Giving this condition a proper name improves the diagnostic experience and advances the SPARK-37935 goal of migrating all legacy error conditions onto named error classes. ### Does this PR introduce _any_ user-facing change? Yes. The error condition name changes from `_LEGACY_ERROR_TEMP_1079` to `UNSUPPORTED_RESOURCE_TYPE_FOR_FUNCTION`, and the message text changes from `Resource Type '<resourceType>' is not supported.` to `Unsupported resource type '<resourceType>' for a function.` This surfaces when loading a function resource of an unsupported type (for example via the Hive metastore function loader). ### How was this patch tested? Added a `checkError` test in `QueryCompilationErrorsSuite` asserting the new condition name and message parameters. Ran `SparkThrowableSuite` (validates `error-conditions.json` formatting, ordering, and SQLSTATE invariants) and `QueryCompilationErrorsSuite`; both pass. ### 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: [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]
