blob: fd0cd3266b1e8fd752454faa6831c1e359313211 (
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
34
35
36
37
38
39
40
41
42
|
(
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input1))) (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 joinFull (EquiJoin '(list1 'a) '(list2 'b) '('Full '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 joinExclusion (EquiJoin '(list1 'a) '(list2 'b) '('Exclusion '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 sortDir4 '((Bool 'true) (Bool 'true) (Bool 'true) (Bool 'true)))
(let sortDir2 '((Bool 'true) (Bool 'true)))
(let keySelectorAB (lambda '(row) '((Member row '"a.key1") (Member row '"a.subkey1") (Member row '"a.value1") (Member row '"b.key2"))))
(let keySelectorA (lambda '(row) '((Member row '"a.key1") (Member row '"a.subkey1"))))
(let keySelectorB (lambda '(row) '((Member row '"b.key2") (Member row '"b.subkey2"))))
(let res_sink (DataSink 'result))
(let world (Write! world res_sink (Key) (Sort joinInner sortDir4 keySelectorAB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinLeft sortDir4 keySelectorAB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinRight sortDir4 keySelectorAB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinFull sortDir4 keySelectorAB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinLeftOnly sortDir2 keySelectorA) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinRightOnly sortDir2 keySelectorB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinExclusion sortDir4 keySelectorAB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinLeftSemi sortDir2 keySelectorA) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinRightSemi sortDir2 keySelectorB) '('('type))))
(let world (Write! world res_sink (Key) (Sort joinCross sortDir4 keySelectorAB) '('('type))))
(let world (Commit! world res_sink))
(return world)
)
|