aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/optimizers/input_view.txt
blob: 962496f023d6dee03d66c74efde546cc35fbd2b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$p = @@
def Parse(s):
    return {'subkey': s, 'value': s}
@@;

$pv = Python::Parse(Callable<(String)->Struct<subkey: String, value: String>>, $p);

$i = (
    select
        AsStruct(key as key),
        $pv(info) as info
    from ViewSource
    where info != ""
);

$j = (
    select *
    from $i flatten columns
);

select * from $j