aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/nulls.sql
blob: 3ba41432268b36cb8ccc011f82ac74d039be42e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use plato;

insert into @foo
select 

    1 as a,
    Nothing(pgcstring) as i1,
    
    Just(Nothing(pgcstring)) as j1,
    Nothing(pgcstring?) as j2,
    
    Just(Just(Nothing(pgcstring))) as k1,
    Just(Nothing(pgcstring?)) as k2,
    Nothing(pgcstring??) as k3
    
;

commit;

insert into @bar
select t.a+1 as a,t.* without a from @foo as t;

commit;

select 
a,
i1,i1 is null as i1n,
j1,j1 is null as j1n,
j2,j2 is null as j2n,
k1,k1 is null as k1n,
k2,k2 is null as k2n,
k3,k3 is null as k3n
from @bar;