diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-20 17:37:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 17:37:57 +0000 |
commit | f76323e9b295c15751e51e3443aa47a36bee8023 (patch) | |
tree | 4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/s-expressions/suites/Join/CommonJoinCore.yql | |
parent | 753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff) | |
parent | a7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff) | |
download | ydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz |
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 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) +) |