[SPARK-57752][SPARK-57753][SPARK-57754][SQL] Assign names to Hive UDF Java type error conditions#56905
Open
michaelmitchell-bit wants to merge 1 commit into
Conversation
… Java type error conditions
MaxGekk
approved these changes
Jun 30, 2026
MaxGekk
left a comment
Member
There was a problem hiding this comment.
0 blocking, 0 non-blocking, 0 nits.
Clean legacy-error-class assignment — _LEGACY_ERROR_TEMP_3090/3091/3092 → UNSUPPORTED_HIVE_FUNCTION_TYPE.{RAW_LIST,RAW_MAP,WILDCARD}. LGTM.
Verification
- Registry well-formed: alphabetical placement (
UNSUPPORTED_GROUPING_EXPRESSION<UNSUPPORTED_HIVE_FUNCTION_TYPE<UNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVA; subclassesRAW_LIST<RAW_MAP<WILDCARD),0A000set (satisfies "SQLSTATE is mandatory"), and the three assembled templates are distinct — soSparkThrowableSuite's formatting/uniqueness checks pass. Structure mirrors the existingUNSUPPORTED_FEATUREparent-with-subclasses. - No dangling references: a repo-wide grep for the three removed legacy classes finds only the six sites this PR updates.
- Call sites + tests consistent:
messageParameters = Map.emptymatches the no-parameter messages, and all three subclasses are exercised (testUDFRawList/testUDFRawMap/testUDFWildcardList). - Docs: no manual update needed —
docs/sql-error-conditions.mdis auto-derived fromerror-conditions.jsonviadocs/_plugins/build-error-docs.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR assigns named error conditions and SQLSTATEs for three Hive UDF/UDAF/UDTF Java type legacy error classes:
_LEGACY_ERROR_TEMP_3090->UNSUPPORTED_HIVE_FUNCTION_TYPE.RAW_LIST_LEGACY_ERROR_TEMP_3091->UNSUPPORTED_HIVE_FUNCTION_TYPE.RAW_MAP_LEGACY_ERROR_TEMP_3092->UNSUPPORTED_HIVE_FUNCTION_TYPE.WILDCARDThe three conditions share the
UNSUPPORTED_HIVE_FUNCTION_TYPEparent with SQLSTATE0A000because all three cases reject unsupported Hive function Java type signatures while Spark infers Catalyst types.Why are the changes needed?
To replace temporary legacy error classes with stable named error conditions and SQLSTATEs.
Does this PR introduce any user-facing change?
Yes. The affected errors now report named error conditions and SQLSTATEs, and their messages are grouped under the new
UNSUPPORTED_HIVE_FUNCTION_TYPEcondition.How was this patch tested?
Ran targeted tests:
Also ran:
Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex