You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2026/06/29 19:10:00 UTC
[jira] [Updated] (SPARK-57752) Assign a name to the error condition _LEGACY_ERROR_TEMP_3090
[ https://issues.apache.org/jira/browse/SPARK-57752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Gekk updated SPARK-57752:
-----------------------------
Description:
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}}).
> 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
> Priority: Major
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org