I am trying to add a new column of Array Type to the table with default value.
%sql
ALTER TABLE testdb.tabname ADD COLUMN new_arr_col ARRAY DEFAULT ['A','B','C'];
But it says that the data type in not supported
Error in SQL statement: ParseException:
DataType array is not supported.(line 1, pos 54)
== SQL ==
ALTER TABLE testdb.dim_category ADD COLUMN c_cat_area ARRAY
So, there is no way we can add an array column directly to the table? Kindly assist me on this. Thanks in advance!
DEFAULTkeyword makes me think you use Databricks (not a vanilla Delta Lake on Spark 3.2)?DEFAULTis supported in Delta Lake OSS. It will only work in Databricks.