diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql')
-rw-r--r-- | yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql b/yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql new file mode 100644 index 0000000000..8bf51c75d5 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql @@ -0,0 +1,53 @@ +( +(let mr_source (DataSource 'yt 'plato)) +(let emptyInt32 (Nothing (OptionalType (DataType 'Int32)))) +(let emptyString (Nothing (OptionalType (DataType 'String)))) +(let list1 (AsList + (AsStruct '('key1 (Just (Int32 '1))) '('value1 (Just (String 'A))) '('key2 emptyInt32) '('value2 emptyString) '('_yql_table_index (Uint32 '0)) '('_yql_join_column_0 (Just (Int32 '1)))) + (AsStruct '('key1 (Just (Int32 '1))) '('value1 (Just (String 'B))) '('key2 emptyInt32) '('value2 emptyString) '('_yql_table_index (Uint32 '0)) '('_yql_join_column_0 (Just (Int32 '1)))) +)) + +(let list2 (AsList + (AsStruct '('key1 emptyInt32) '('value1 emptyString) '('key2 (Just (Int32 '1))) '('value2 (Just (String 'X))) '('_yql_table_index (Uint32 '1)) '('_yql_join_column_0 (Just (Int32 '1)))) + (AsStruct '('key1 emptyInt32) '('value1 emptyString) '('key2 (Just (Int32 '1))) '('value2 (Just (String 'Y))) '('_yql_table_index (Uint32 '1)) '('_yql_join_column_0 (Just (Int32 '1)))) +)) + +(let list12 (AsList + (AsStruct '('key1 (Just (Int32 '1))) '('value1 (Just (String 'A))) '('key2 emptyInt32) '('value2 emptyString) '('_yql_table_index (Uint32 '0)) '('_yql_join_column_0 (Just (Int32 '1)))) + (AsStruct '('key1 emptyInt32) '('value1 emptyString) '('key2 (Just (Int32 '1))) '('value2 (Just (String 'X))) '('_yql_table_index (Uint32 '1)) '('_yql_join_column_0 (Just (Int32 '1)))) + (AsStruct '('key1 (Just (Int32 '1))) '('value1 (Just (String 'B))) '('key2 emptyInt32) '('value2 emptyString) '('_yql_table_index (Uint32 '0)) '('_yql_join_column_0 (Just (Int32 '1)))) + (AsStruct '('key1 emptyInt32) '('value1 emptyString) '('key2 (Just (Int32 '1))) '('value2 (Just (String 'Y))) '('_yql_table_index (Uint32 '1)) '('_yql_join_column_0 (Just (Int32 '1)))) +)) + +(let writeRes (lambda '(world list) (block '( +(let joinInner (CommonJoinCore (Iterator list (DependsOn (String 'Inner))) 'Inner '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinLeft (CommonJoinCore (Iterator list (DependsOn (String 'Left))) 'Left '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinRight (CommonJoinCore (Iterator list (DependsOn (String 'Right))) 'Right '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinFull (CommonJoinCore (Iterator list (DependsOn (String 'Full))) 'Full '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinLeftOnly (CommonJoinCore (Iterator list (DependsOn (String 'LeftOnly))) 'LeftOnly '('key1 'value1) '() '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinLeftSemi (CommonJoinCore (Iterator list (DependsOn (String 'LeftSemi))) 'LeftSemi '('key1 'value1) '() '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinRightOnly (CommonJoinCore (Iterator list (DependsOn (String 'RightOnly))) 'RightOnly '() '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinRightSemi (CommonJoinCore (Iterator list (DependsOn (String 'RightSemi))) 'RightSemi '() '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinExclusion (CommonJoinCore (Iterator list (DependsOn (String 'Exclusion))) 'Exclusion '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) +(let joinCross (CommonJoinCore (Iterator list (DependsOn (String 'Cross))) 'Cross '('key1 'value1) '('key2 'value2) '() '('_yql_join_column_0) '() '_yql_table_index)) + +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) (Collect joinInner) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinLeft) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinRight) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinFull) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinLeftOnly) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinLeftSemi) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinRightOnly) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinRightSemi) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinExclusion) '('('type)))) +(let world (Write! world res_sink (Key) (Collect joinCross) '('('type)))) +(let world (Commit! world res_sink)) +(return world) +)))) + +(let world (Apply writeRes world list1)) +(let world (Apply writeRes world list2)) +(let world (Apply writeRes world list12)) +(return world) +) |