[ 
https://issues.apache.org/jira/browse/SPARK-57752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gekk reassigned SPARK-57752:
--------------------------------

    Assignee: Michael Mitchell  (was: Max Gekk)

> Assign a name to the error condition _LEGACY_ERROR_TEMP_3090
> ------------------------------------------------------------
>
>                 Key: SPARK-57752
>                 URL: https://issues.apache.org/jira/browse/SPARK-57752
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 5.0.0
>            Reporter: Max Gekk
>            Assignee: Michael Mitchell
>            Priority: Major
>              Labels: pull-request-available
>
> h3. Summary
> The error condition {{_LEGACY_ERROR_TEMP_3090}} is raised when a Hive 
> UDF/UDAF/UDTF declares a *raw* {{java.util.List}} (no element type parameter) 
> in its method signature. Spark cannot infer the array element type from a raw 
> list, 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}
> // raw java list type unsupported
> case c: Class[_] if isSubClassOf(c, classOf[java.util.List[_]]) =>
>   throw new AnalysisException(
>     errorClass = "_LEGACY_ERROR_TEMP_3090", messageParameters = Map.empty)
> {code}
> The unnamed legacy condition is used with an empty message parameter map.
> h3. Proposed change
> * Replace {{_LEGACY_ERROR_TEMP_3090}} with a descriptive error condition for 
> an unsupported raw {{List}} type whose element type cannot be inferred.
> * 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 "UDFRawList").
> 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]

Reply via email to