summaryrefslogtreecommitdiffstats
path: root/yt/yql/tests/sql/suites/select/struct_access_without_table_name.yql
blob: 0a3446a3399046085162333d9ff530e678e24b28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* postgres can not */
use plato;

$data = ( select
    cast(key as uint32) % 10 as mod,
    (key as kk, subkey as sk) as struct_field,
    value
from Input);

--INSERT INTO Output
SELECT
    mod,
    struct_field.kk as mod_key,
    struct_field.sk,
    d.value
FROM $data as d
order by mod_key, value
;