aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/EquiJoin/FlattenLeft.yqls
blob: 9533ee9fb89ad4bfe27d3d1b579e8a67bb572d91 (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
(
 (let data.source (DataSource 'yt 'plato))
 (let data.sink (DataSink 'yt 'plato))
 (let input_left (Read! world data.source (Key '('table (String 'Input4))) (Void) '()))
 (let world (Left! input_left))
 (let input_left (Right! input_left))
   
 (let input_right (Read! world data.source (Key '('table (String 'Input5))) (Void) '()))
 (let world (Left! input_right))
 (let input_right (Right! input_right))
 
 (let output (EquiJoin '((RemoveSystemMembers input_left) 'left) '((RemoveSystemMembers input_right) 'right)
   '('Left 'left 'right '('left 'id) '('right 'id) '()) '('('flatten))
 ))

 (let output (Map output (lambda '(item) (block '(
   (let item (AddMember item 'val (String '"")))
   (return item)
 )))))

 (let res_sink (DataSink 'result))
 (let world (Write! world res_sink (Key) output '('('type))))
 (let world (Commit! world res_sink))
 
 (return world)
)