I have a table containing an array, and I want to check if it is empty or NULL. It appears that I cannot check the NULL directly! Can anyone shed light on why the NULL check isn't working?
create table `test_array_split`
( `campaign` string
, `questions` array<string>
)
stored as orc ;
insert into `test_array_split` (`campaign`) values ('1');
select
`campaign`
, `questions`
, size(`questions`)
, case when `questions` is null then 'null' else 'not null' end `isnull`
from `test_array_split`;
+-----------+------------+------+-----------+
| campaign | questions | _c2 | isnull |
+-----------+------------+------+-----------+
| 1 | NULL | -1 | not null |
+-----------+------------+------+-----------+