[ 
https://issues.apache.org/jira/browse/SPARK-41931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680001#comment-17680001
 ] 

Apache Spark commented on SPARK-41931:
--------------------------------------

User 'RunyaoChen' has created a pull request for this issue:
https://github.com/apache/spark/pull/39711

> Improve UNSUPPORTED_DATA_TYPE message for complex types
> -------------------------------------------------------
>
>                 Key: SPARK-41931
>                 URL: https://issues.apache.org/jira/browse/SPARK-41931
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 3.4.0
>            Reporter: Serge Rielau
>            Priority: Major
>
> spark-sql> SELECT CAST(array(1, 2, 3) AS ARRAY);
> [UNSUPPORTED_DATATYPE] Unsupported data type "ARRAY"(line 1, pos 30)
> == SQL ==
> SELECT CAST(array(1, 2, 3) AS ARRAY)
> ------------------------------^^^
> This error message is confusing. We support ARRAY. We just require it to be 
> typed.
> We should have an error like:
> [INCOMPLETE_TYPE_DEFINITION.ARRAY] The definition of type `ARRAY` is 
> incomplete. You must provide an element type. For example: `ARRAY\<INT\>`.
> Similarly for STRUCT and MAP.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to