aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/EquiJoinMap/JoinMapOpt1.yql
blob: e50b5b2bf5aeeb5abd19c24dcaa6cc6f384e13fc (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
27
28
29
30
31
32
33
(
(let world (Configure! world (DataSource '"yt" '"$all") '"Attr" '"mapjoinlimit" '"1m"))
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input1Opt))) (Void) '()))
(let world (Left! x))
(let list1 (Right! x))

(let x (Read! world mr_source (Key '('table (String 'Input2))) (Void) '()))
(let world (Left! x))
(let list2 (Right! x))

(let joinInner (EquiJoin '(list1 'a) '(list2 'b) '('Inner 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinLeft (EquiJoin '(list1 'a) '(list2 'b) '('Left 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinRight (EquiJoin '(list1 'a) '(list2 'b) '('Right 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinLeftOnly (EquiJoin '(list1 'a) '(list2 'b) '('LeftOnly 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinRightOnly (EquiJoin '(list1 'a) '(list2 'b) '('RightOnly 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinLeftSemi (EquiJoin '(list1 'a) '(list2 'b) '('LeftSemi 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinRightSemi (EquiJoin '(list1 'a) '(list2 'b) '('RightSemi 'a 'b '('a 'key1) '('b 'key2) '()) '()))
(let joinCross (EquiJoin '(list1 'a) '(list2 'b) '('Cross 'a 'b '() '() '()) '()))

(let res_sink (DataSink 'result))
(let world (Write! world res_sink (Key) joinInner '('('type))))
(let world (Write! world res_sink (Key) joinLeft '('('type))))
(let world (Write! world res_sink (Key) joinRight '('('type))))
(let world (Write! world res_sink (Key) joinLeftOnly '('('type))))
(let world (Write! world res_sink (Key) joinRightOnly '('('type))))
(let world (Write! world res_sink (Key) joinLeftSemi '('('type))))
(let world (Write! world res_sink (Key) joinRightSemi '('('type))))
(let world (Write! world res_sink (Key) joinCross '('('type))))

(let world (Commit! world res_sink))
(return world)
)