aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/EquiJoinMerge/Full2key12_1o2o.yqls
blob: 02fe6bd9b738ae57fd019f94c7997bff1bacc259 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(
(let world (Configure! world (DataSource '"yt" '"$all") '"Attr" '"joinmergetableslimit" '"10"))
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input1opt))) '('key 'subkey 'value1) '()))
(let world (Left! x))
(let table1 (Right! x))
(let x (Read! world mr_source (Key '('table (String 'Input2opt))) '('key 'subkey 'value2) '()))
(let world (Left! x))
(let table2 (Right! x))
(let join (EquiJoin '(table1 'a) '(table2 'b)
    '('Full '"a" '"b" '('"a" '"key" '"a" '"subkey") '('"b" '"key" '"b" '"subkey") '()) 
    '()))
(let res_sink (DataSink 'result))
(let sortDir '((Bool 'true) (Bool 'true)))
(let keySelector (lambda '(row) '((Member row '"a.key") (Member row '"a.subkey"))))
(let world (Write! world res_sink (Key) (Sort join sortDir keySelector) '('('type))))
(let world (Commit! world res_sink))
(return world)
)