Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
None
Description
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.