[
https://issues.apache.org/jira/browse/SPARK-57754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Max Gekk resolved SPARK-57754.
------------------------------
Resolution: Fixed
> Assign a name to the error condition _LEGACY_ERROR_TEMP_3092
> ------------------------------------------------------------
>
> Key: SPARK-57754
> URL: https://issues.apache.org/jira/browse/SPARK-57754
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 5.0.0
> Reporter: Max Gekk
> Assignee: Michael Mitchell
> Priority: Major
>
> h3. Summary
> The error condition {{_LEGACY_ERROR_TEMP_3092}} is raised when a Hive
> UDF/UDAF/UDTF declares a collection type with a *wildcard* type argument
> (e.g. {{List<?>}} or {{Map<?, ?>}}) in its method signature. Spark cannot
> infer a concrete data type for a wildcard type parameter, so type resolution
> fails. As part of the error-class migration (umbrella SPARK-37935), it should
> be given a proper, descriptive name.
> h3. Current behavior
> In {{HiveInspectors.javaTypeToDataType}}
> (sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala):
> {code:scala}
> case _: WildcardType =>
> throw new AnalysisException(
> errorClass = "_LEGACY_ERROR_TEMP_3092", messageParameters = Map.empty)
> {code}
> The unnamed legacy condition is used with an empty message parameter map.
> h3. Proposed change
> * Replace {{_LEGACY_ERROR_TEMP_3092}} with a descriptive error condition for
> an unsupported collection type with wildcard type parameters.
> * Add message parameter(s) if useful (e.g. the offending class/type name).
> * Update the affected test to assert via {{checkError}} on the new condition
> (HiveUDFSuite "UDFWildcardList").
> h3. Context
> Found while migrating {{_LEGACY_ERROR_TEMP_3084}} under SPARK-57750. That
> change wraps Hive UDF/UDAF/UDTF wrapper-instantiation failures in the new
> {{CANNOT_INSTANTIATE_HIVE_FUNCTION}} condition and attaches the original
> failure as the exception cause. This condition is one such inner cause, now
> surfaced via {{getCause}} (see the corresponding test in
> {{sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]