If i launch this query :
with a as (
select cast(null as array<string>) as x union all select ['str1','str2'] as x)
select * from a where x is null
I get this result :

This is the result i expected.
But if i first launch this query :
select cast(null as array<string>) as x union all select ['str1', 'str2'] as x
whose result i save in a table "a" in a dataset "tmp" and then i launch this query :
select * from `tmp.a` where x is null
I get this result :

I expected a result identical to the first one. Why is there a difference between the two results ?
Workaround : To get the same result for both cases you could use in your where clause the function ARRAY_LENGTH(x)=0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With