LuciferYang opened a new pull request, #57400: URL: https://github.com/apache/spark/pull/57400
### What changes were proposed in this pull request? Resolve three legacy error conditions raised in `HiveInspectors`: - `_LEGACY_ERROR_TEMP_3093` (the `javaTypeToDataType` fallthrough for an unsupported Hive UDF Java type) becomes a new subclass `UNSUPPORTED_HIVE_FUNCTION_TYPE.UNKNOWN_TYPE`, alongside the existing `RAW_LIST` / `RAW_MAP` / `WILDCARD` subclasses raised from the same method. - `_LEGACY_ERROR_TEMP_3094` (`decimalTypeInfo`) and `_LEGACY_ERROR_TEMP_3095` (the `toTypeInfo` fallthrough) reuse the existing `unsupportedHiveType` helper, which throws `UNSUPPORTED_DATATYPE` — the same condition already used by the sibling `TimeType` branches in those two methods. The three legacy entries are removed from `error-conditions.json`. ### Why are the changes needed? The error-conditions README disallows new `_LEGACY_ERROR_TEMP_*` entries and asks existing ones to be resolved. This resolves three of them, reusing existing conditions where the semantics already match (`UNSUPPORTED_DATATYPE`) rather than minting new names. ### Does this PR introduce _any_ user-facing change? No. The `_LEGACY_ERROR_TEMP_*` names are not part of the public API. The `UNKNOWN_TYPE` message renders as "Unsupported Hive UDF/UDAF/UDTF Java type: <c>."; the `_3094`/`_3095` paths now render the standard "Unsupported data type <typeName>." consistent with the neighboring `TimeType` handling. ### How was this patch tested? - Added a `checkError` test in `HiveUDFSuite` (`UDFRawSet`, a UDF returning a raw `java.util.Set`) asserting `UNSUPPORTED_HIVE_FUNCTION_TYPE.UNKNOWN_TYPE`. - Updated the `HiveScriptTransformationSuite` SPARK-32400 tests to `checkError` on `UNSUPPORTED_DATATYPE` (previously asserted the old `_3095` message text). - `build/sbt "hive/testOnly *HiveUDFSuite *HiveScriptTransformationSuite" "core/testOnly org.apache.spark.SparkThrowableSuite"` passes. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (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]
