summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/blocks/coalesce_scalar.yql
blob: 684082c7235c38eb5cd3f0e30d40d930dccb9514 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$data1 = [
    <|x:nothing(int32?),y:10|>,
    <|x:just(1),y:10|>,
];

$data2 = [
    <|x:nothing(int32?),y:just(10)|>,
    <|x:just(1),y:just(10)|>,
    <|x:just(1),y:nothing(int32?)|>,
];

select x ?? Opaque(10), Opaque(nothing(int32?)) ?? y, Opaque(just(1)) ?? y from as_table($data1);

select x ?? Opaque(just(10)),x ?? Opaque(nothing(int32?)),Opaque(nothing(int32?)) ?? y,Opaque(just(1)) ?? y from as_table($data2);