aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt')
-rw-r--r--yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt b/yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt
new file mode 100644
index 0000000000..ebf3709fbe
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/EquiJoinAny/DoAllJoinsExceptCross.yql.txt
@@ -0,0 +1,54 @@
+(
+
+(let doAllJoinsExceptCrossEx (lambda '(world list1 list2 link) ( block '(
+
+ (let joinInner (EquiJoin '(list1 'a) '(list2 'b) '('Inner 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinLeft (EquiJoin '(list1 'a) '(list2 'b) '('Left 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinRight (EquiJoin '(list1 'a) '(list2 'b) '('Right 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinFull (EquiJoin '(list1 'a) '(list2 'b) '('Full 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinLeftOnly (EquiJoin '(list1 'a) '(list2 'b) '('LeftOnly 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinRightOnly (EquiJoin '(list1 'a) '(list2 'b) '('RightOnly 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinExclusion (EquiJoin '(list1 'a) '(list2 'b) '('Exclusion 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinLeftSemi (EquiJoin '(list1 'a) '(list2 'b) '('LeftSemi 'a 'b '('a 'key) '('b 'key) link) '()))
+ (let joinRightSemi (EquiJoin '(list1 'a) '(list2 'b) '('RightSemi 'a 'b '('a 'key) '('b 'key) link) '()))
+
+ (let sortDir2 '((Bool 'true) (Bool 'true)))
+ (let sortDir1 '((Bool 'true)))
+ (let keySelectorAB (lambda '(row) '((Member row '"a.key") (Member row '"b.key"))))
+ (let keySelectorA (lambda '(row) '((Member row '"a.key"))))
+ (let keySelectorB (lambda '(row) '((Member row '"b.key"))))
+
+ (let res_sink (DataSink 'result))
+ (let world (Write! world res_sink (Key) (Sort joinInner sortDir2 keySelectorAB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinLeft sortDir2 keySelectorAB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinRight sortDir2 keySelectorAB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinFull sortDir2 keySelectorAB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinLeftOnly sortDir1 keySelectorA) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinRightOnly sortDir1 keySelectorB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinExclusion sortDir2 keySelectorAB) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinLeftSemi sortDir1 keySelectorA) '('('type))))
+ (let world (Write! world res_sink (Key) (Sort joinRightSemi sortDir1 keySelectorB) '('('type))))
+
+ (let world (Commit! world res_sink))
+ (return world)
+
+))))
+
+(let doAllJoinsExceptCrossLink (lambda '(world t1 t2 link) ( block '(
+ (let mr_source (DataSource 'yt 'plato))
+ (let x (Read! world mr_source (Key '('table (String t1))) (Void) '()))
+ (let world (Left! x))
+ (let list1 (Right! x))
+
+ (let x (Read! world mr_source (Key '('table (String t2))) (Void) '()))
+ (let world (Left! x))
+ (let list2 (Right! x))
+
+ (return (Apply doAllJoinsExceptCrossEx world list1 list2 link))
+))))
+
+
+(export doAllJoinsExceptCrossLink)
+(export doAllJoinsExceptCrossEx)
+
+)