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/ManyInputTables | |
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/ManyInputTables')
50 files changed, 880 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldProject.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldProject.yql new file mode 100644 index 0000000000..55b38fb1b9 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldProject.yql @@ -0,0 +1,59 @@ +( +(let world (block '( + (let x (Read! world (DataSource '"yt" '"plato") (Key '('table (String '"Input1"))) '('"key") '())) + (let world (Left! x)) + (let table0 (Right! x)) + (let x (Read! world (DataSource '"yt" '"plato") (Key '('table (String '"Input2"))) '('"key") '())) + (let world (Left! x)) + (let table1 (Right! x)) + (let output (block '( + (let select (block '( + (let core (block '( + (let select (UnionAll (block '( + (let core table0) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AddMember res '"A" (String '"1"))) + (let res (AsList res)) + (return res) + ))))) + (return core) + )) (block '( + (let core table1) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AddMember res '"A" (Int64 '"1"))) + (let res (AsList res)) + (return res) + ))))) + (return core) + )))) + (return select) + ))) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AddMember res '"column1" ("Concat" (Member row '"key") (String '"AAA")))) + (let res (AsList res)) + (return res) + ))))) + (return core) + ))) + (return select) + ))) + (let world (block '( + (let result_sink (DataSink 'result)) + (let world (Write! world result_sink (Key) output '('('type) '('autoref) '('columns '('"key" '"column1"))))) + (return (Commit! world result_sink)) + ))) + (return world) +))) +(let world (block '( + (let plato_sink (DataSink '"yt" '"plato")) + (let world (Commit! world plato_sink)) + (return world) +))) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldRead.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldRead.yql new file mode 100644 index 0000000000..67becd3ffb --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/BadUnionButUnusedFieldRead.yql @@ -0,0 +1,58 @@ +( +(let world (block '( + (let x (Read! world (DataSource '"yt" '"plato") (Key '('table (String '"Input1"))) '('"key") '())) + (let world (Left! x)) + (let table0 (Right! x)) + (let x (Read! world (DataSource '"yt" '"plato") (Key '('table (String '"Input2"))) '('"key") '())) + (let world (Left! x)) + (let table1 (Right! x)) + (let output (block '( + (let select (block '( + (let core (block '( + (let select (UnionAll (block '( + (let core table0) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AddMember res '"A" (String '"1"))) + (let res (AsList res)) + (return res) + ))))) + (return core) + )) (block '( + (let core table1) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AddMember res '"A" (Int64 '"1"))) + (let res (AsList res)) + (return res) + ))))) + (return core) + )))) + (return select) + ))) + (let core (FlatMap core (lambda '(row) (block '( + (let res (Struct)) + (let res (AddMember res '"key" (Member row '"key"))) + (let res (AsList res)) + (return res) + ))))) + (return core) + ))) + (return select) + ))) + (let world (block '( + (let result_sink (DataSink 'result)) + (let world (Write! world result_sink (Key) output '('('type) '('autoref) '('columns '('"key"))))) + (return (Commit! world result_sink)) + ))) + (return world) +))) +(let world (block '( + (let plato_sink (DataSink '"yt" '"plato")) + (let world (Commit! world plato_sink)) + (return world) +))) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.cfg new file mode 100644 index 0000000000..e5e19ca2fb --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.cfg @@ -0,0 +1,16 @@ +in Input1 input1.txt +in Input2 input1.txt +in Input3 input1.txt +in Input4 input1.txt +in Input5 input1.txt +in Input6 input1.txt +in Input7 input1.txt +in Input8 input1.txt +in Input9 input1.txt +in Input10 input1.txt +in Input11 input1.txt +in Input12 input1.txt +in Input13 input1.txt +in Input14 input1.txt +in Input15 input1.txt +res result.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.yql new file mode 100644 index 0000000000..89b7fd5a76 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/CompactPlan.yql @@ -0,0 +1,58 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input3))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table3 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input4))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table4 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input5))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table5 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input6))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table6 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input7))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table7 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input8))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table8 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input9))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table9 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input10))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table10 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input11))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table11 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input12))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table12 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input13))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table13 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input14))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table14 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input15))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table15 (Right! x)) +(let lens (AsList + (Length table1) (Length table2) (Length table3) (Length table4) (Length table5) + (Length table6) (Length table7) (Length table8) (Length table9) (Length table10) + (Length table11) (Length table12) (Length table13) (Length table14) (Length table15))) +(let result (Fold lens (Uint64 '0) (lambda '(x y) (+ x y)))) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/ConcatSortedAndNonSorted.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ConcatSortedAndNonSorted.yql new file mode 100644 index 0000000000..a16749b54f --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ConcatSortedAndNonSorted.yql @@ -0,0 +1,12 @@ +( +(let source (DataSource 'yt 'plato)) +(let x (Read! world source (Key '('table (String 'Input1))) '('key 'value) '())) +(let world (Left! x)) +(let table (Right! x)) +(let sorted (Sort table (Bool 'true) (lambda '(item) (Member item 'value)))) +(let result (Extend table sorted)) +(let sink (DataSink 'yt 'plato)) +(let world (Write! world sink (Key '('table (String 'Output))) result '())) +(let world (Commit! world sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupAndSort.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupAndSort.yql new file mode 100644 index 0000000000..08089395f7 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupAndSort.yql @@ -0,0 +1,21 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let offset (Uint64 '5)) +(let result (Extend table1 table1)) +(let result (Sort result (Bool 'true) (lambda '(row) (block '( + (let res (Member row 'key)) + (return res) +) +)))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupByExtend.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupByExtend.yql new file mode 100644 index 0000000000..0089378d22 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/DupByExtend.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let offset (Uint64 '5)) +(let result (Extend table1 table1)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/ExtendBetweenSorts.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ExtendBetweenSorts.yql new file mode 100644 index 0000000000..110b0a004a --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ExtendBetweenSorts.yql @@ -0,0 +1,29 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let result1 (Sort table1 (Bool 'true) (lambda '(row) (block '( + (let res (Member row 'value)) + (return res) +) +)))) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let offset (Uint64 '5)) +(let result2 (Extend result1 table2)) +(let result2 (Sort result2 '((Bool 'true) (Bool 'true)) (lambda '(row) (block '( + (let res '((Member row 'key) (Member row 'subkey))) + (return res) +) +)))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result2 '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result2 '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterAfterExtend.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterAfterExtend.yql new file mode 100644 index 0000000000..1c7045232c --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterAfterExtend.yql @@ -0,0 +1,19 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let tresh (String '100)) +(let result (Filter (Extend table1 table2) (lambda '(item) (< (Member item 'key) tresh)))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterBeforeExtend.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterBeforeExtend.yql new file mode 100644 index 0000000000..2f2f487eca --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/FilterBeforeExtend.yql @@ -0,0 +1,17 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let tresh (String '100)) +(let result (Filter table1 (lambda '(item) (< (Member item 'key) tresh)))) +(let result (Extend result table2)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let world (Commit! world mr_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.cfg new file mode 100644 index 0000000000..656c5e8480 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.cfg @@ -0,0 +1,5 @@ +in Input1 non_ksv_input1.txt +in Input2 non_ksv_input2.txt +out Output output.txt +res result.txt +mount ..\mounts.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.yql new file mode 100644 index 0000000000..1afa2e265e --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcat.yql @@ -0,0 +1,13 @@ +( +#comment +(import aggregate_module '"/lib/yql/aggregate.yql") +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (MrTableConcat (Key '('table (String 'Input1))) (Key '('table (String 'Input2)))) (Void) '())) +(let world (Left! x)) +(let core (Right! x)) +(let core (Aggregate core '('"age") '('('cnt (Apply (bind aggregate_module '"count_traits_factory") (TypeOf core) (lambda '(row) (Void))))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) core '())) +(let world (Commit! world mr_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.cfg new file mode 100644 index 0000000000..31a57e15ff --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.cfg @@ -0,0 +1,9 @@ +in Input1 non_ksv_input1.txt +in Input2 non_ksv_input3.txt +in Input3 non_ksv_input1.txt +in Input4 non_ksv_input3.txt +in Input5 non_ksv_input1.txt +in Input6 non_ksv_input3.txt +out Output output.txt +res result.txt +mount ..\mounts.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.yql new file mode 100644 index 0000000000..2215cc2428 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/GroupAfterWeakConcatOther.yql @@ -0,0 +1,57 @@ +( +(import aggregate_module '"/lib/yql/aggregate.yql") +(import window_module '"/lib/yql/window.yql") +(import core_module '"/lib/yql/core.yql") +(let world (block '( + (let x (Read! world (DataSource '"yt" '"plato") (MrTableConcat + (Key '('table (String '"Input1"))) + (Key '('table (String '"Input2"))) + (Key '('table (String '"Input3"))) + (Key '('table (String '"Input4"))) + (Key '('table (String '"Input5"))) + (Key '('table (String '"Input6"))) + ) (Void) '())) + (let world (Left! x)) + (let table0 (Right! x)) + (let output (block '( + (let select (block '( + (let core (block '( + (let select (block '( + (let core table0) + (let core (FlatMap core (lambda '(row) (block '( + (let res (AsStruct '('"age" (Coalesce + (TryMember row '"age" (Nothing (OptionalType (DataType 'Int64)))) + (FromYsonSimpleType (SqlAccess 'dict (TryMember row '"_other" (Just (Dict (DictType (DataType '"String") (DataType '"String"))))) (String '"age")) 'Int64) + )))) + (let res (AsList res)) + (return res) + ))))) + (return core) + ))) + (return select) + ))) + (let core (Aggregate core '('"age") '('('Count1 (Apply (bind aggregate_module '"count_traits_factory") (TypeOf core) (lambda '(row) (Void))))))) + (let core (FlatMap core (lambda '(row) (block '( + (let res (AsStruct '('"column0" (Member row 'Count1)) '('"age" (Member row '"age")))) + (let res (AsList res)) + (return res) + ))))) + (return core) + ))) + (return select) + ))) + (let output (Sort output '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'column0) (Member item 'age))))) + (let world (block '( + (let result_sink (DataSink 'result)) + (let world (Write! world result_sink (Key) output '('('type) '('autoref) '('columns '('"column0" '"age"))))) + (return (Commit! world result_sink)) + ))) + (return world) +))) +(let world (block '( + (let plato_sink (DataSink '"yt" '"plato")) + (let world (Commit! world plato_sink)) + (return world) +))) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableRange.yql new file mode 100644 index 0000000000..40cb4dc92c --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableRange.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (Key '('table (MrTableRange '"" filter))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let length (Length tables)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) (Just (AsStruct '('value length))) '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) length '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableStrictRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableStrictRange.yql new file mode 100644 index 0000000000..b52191ad74 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTableStrictRange.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (Key '('table (MrTableRangeStrict '"" filter))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let length (Length tables)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) (Just (AsStruct '('value length))) '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) length '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTwoTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTwoTables.yql new file mode 100644 index 0000000000..6855885d32 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfTwoTables.yql @@ -0,0 +1,15 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source '((Key '('table (String 'Input1))) (Key '('table (String 'Input2)))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let length (Length tables)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) (Just (AsStruct '('value length))) '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) length '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfWeakConcatTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfWeakConcatTables.yql new file mode 100644 index 0000000000..b103b4e66e --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/LengthOfWeakConcatTables.yql @@ -0,0 +1,15 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (MrTableConcat (Key '('table (String 'Input1))) (Key '('table (String 'Input2)))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let length (Length tables)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) (Just (AsStruct '('value length))) '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) length '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/ManyTableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ManyTableRange.yql new file mode 100644 index 0000000000..f5612e30a0 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/ManyTableRange.yql @@ -0,0 +1,20 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter1 (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input1"))))) +(let filter3 (lambda '(name) (And (>= name (String '"Input3")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source '( + (Key '('table (MrTableRange '"" filter1))) + (Key '('table (MrTableRange '"" filter3)))) + (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapThreeTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapThreeTables.yql new file mode 100644 index 0000000000..506868f4a8 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapThreeTables.yql @@ -0,0 +1,28 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input3))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table3 (Right! x)) +(let tresh (Int32 '100)) +(let result (FlatMap (Extend table1 (Extend table2 table3)) (lambda '(item) (block '( + (let intValueOpt (FromString (Member item 'key) 'Int32)) + (let ret (FlatMap intValueOpt (lambda '(item2) (block '( + (return (ListIf (< item2 tresh) item)) + ))))) + (return ret) +))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapTwoTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapTwoTables.yql new file mode 100644 index 0000000000..aca48ae0c8 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/MapTwoTables.yql @@ -0,0 +1,25 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let tresh (Int32 '100)) +(let result (FlatMap (Extend table1 table2) (lambda '(item) (block '( + (let intValueOpt (FromString (Member item 'key) 'Int32)) + (let ret (FlatMap intValueOpt (lambda '(item2) (block '( + (return (ListIf (< item2 tresh) item)) + ))))) + (return ret) +))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/Skip.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/Skip.yql new file mode 100644 index 0000000000..1995fa124f --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/Skip.yql @@ -0,0 +1,19 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let offset (Uint64 '5)) +(let result (Skip (Extend table1 table2) offset)) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/SkipTakeThenMapTreeTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SkipTakeThenMapTreeTables.yql new file mode 100644 index 0000000000..a4b1c5f1c6 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SkipTakeThenMapTreeTables.yql @@ -0,0 +1,28 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input3))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table3 (Right! x)) +(let e (Extend table1 (Extend table2 table3))) +(let e (Skip e (Uint64 '5))) +(let e (Take e (Uint64 '6))) +(let table1map (Map e (lambda '(item) (block '( + (let value (Member item 'value)) + (let s (Struct)) + (let s (AddMember s 'key (Member item 'key))) + (let s (AddMember s 'subkey (String '""))) + (let s (AddMember s 'value value)) + (return s) +))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) table1map '('('mode 'append)))) +(let world (Commit! world mr_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/SortTwoTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SortTwoTables.yql new file mode 100644 index 0000000000..799d9cb488 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SortTwoTables.yql @@ -0,0 +1,24 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table1 (Right! x)) +(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '())) +(let world (Left! x)) +(let table2 (Right! x)) +(let offset (Uint64 '5)) +(let result (Extend table1 table2)) +(let result (Sort result '((Bool 'true) (Bool 'true)) (lambda '(row) (block '( + (let res '((Member row 'key) (Member row 'subkey))) + (return res) +) +)))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) result '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) result '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/SplitTableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SplitTableRange.yql new file mode 100644 index 0000000000..8793b592e7 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/SplitTableRange.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let world (Configure! world (DataSource '"yt" '"$all") '"Attr" '"maxinputtables" '"2")) +(let x (Read! world mr_source (Key '('table (MrTableRange '"" (lambda '($i) (And (>= $i (String '"Input1")) (<= $i (String '"Input~")))) '""))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRange.yql new file mode 100644 index 0000000000..5e16c9166d --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRange.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (Key '('table (MrTableRange '"" filter))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRangeStrict.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRangeStrict.yql new file mode 100644 index 0000000000..80647dd661 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/TableRangeStrict.yql @@ -0,0 +1,16 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (Key '('table (MrTableRangeStrict '"" filter))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverStrictTableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverStrictTableRange.yql new file mode 100644 index 0000000000..3cca68b2ab --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverStrictTableRange.yql @@ -0,0 +1,20 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter1 (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input1"))))) +(let filter3 (lambda '(name) (And (>= name (String '"Input3")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (MrTableConcat + (Key '('table (MrTableRangeStrict '"" filter1))) + (Key '('table (MrTableRangeStrict '"" filter3)))) + (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverTableRange.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverTableRange.yql new file mode 100644 index 0000000000..b43c3f66d4 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatOverTableRange.yql @@ -0,0 +1,20 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let filter1 (lambda '(name) (And (>= name (String '"Input1")) (<= name (String '"Input1"))))) +(let filter3 (lambda '(name) (And (>= name (String '"Input3")) (<= name (String '"Input3"))))) +(let x (Read! world mr_source (MrTableConcat + (Key '('table (MrTableRange '"" filter1))) + (Key '('table (MrTableRange '"" filter3)))) + (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(item) '((Member item 'key) (Member item 'subkey))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '())) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.cfg new file mode 100644 index 0000000000..a87e460b09 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.cfg @@ -0,0 +1,4 @@ +in Input1 non_ksv_input1.txt +in Input2 non_ksv_input2.txt +out Output output.txt +res result.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.yql new file mode 100644 index 0000000000..a9ac514a99 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTables.yql @@ -0,0 +1,15 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (MrTableConcat (Key '('table (String 'Input1))) (Key '('table (String 'Input2)))) (Void) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(row) '((Member row 'name) (Member row 'name2))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '('('type)))) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.cfg new file mode 100644 index 0000000000..d7ef0e0048 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.cfg @@ -0,0 +1,4 @@ +in Input1 non_ksv_input1_bad.txt +in Input2 non_ksv_input2_bad.txt +out Output output.txt +res result.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.yql b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.yql new file mode 100644 index 0000000000..da7c64aa5d --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/WeakConcatTablesBadUnusedColumn.yql @@ -0,0 +1,15 @@ +( +#comment +(let mr_source (DataSource 'yt 'plato)) +(let x (Read! world mr_source (MrTableConcat (Key '('table (String 'Input1))) (Key '('table (String 'Input2)))) '('name 'name2) '())) +(let world (Left! x)) +(let tables (Right! x)) +(let tables (Sort tables '((Bool 'true) (Bool 'true)) (lambda '(row) '((Member row 'name) (Member row 'name2))))) +(let mr_sink (DataSink 'yt (quote plato))) +(let world (Write! world mr_sink (Key '('table (String 'Output))) tables '())) +(let res_sink (DataSink 'result)) +(let world (Write! world res_sink (Key) tables '('('type)))) +(let world (Commit! world mr_sink)) +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/default.cfg b/yql/essentials/tests/s-expressions/suites/ManyInputTables/default.cfg new file mode 100644 index 0000000000..5cdd7ddbf6 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/default.cfg @@ -0,0 +1,5 @@ +in Input1 input1.txt +in Input2 input2.txt +in Input3 input3.txt +out Output output.txt +res result.txt diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt new file mode 100644 index 0000000000..f53757c309 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt @@ -0,0 +1,4 @@ +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="800";"subkey"="1";"value"="ddd"}; +{"key"="020";"subkey"="1";"value"="q"}; +{"key"="150";"subkey"="1";"value"="qzz"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt.attr new file mode 100644 index 0000000000..b6100e5fd0 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input1.txt.attr @@ -0,0 +1,30 @@ +{ + "_yql_row_spec" = { + "Type" = [ + "StructType"; + [ + [ + "key"; + [ + "DataType"; + "String" + ] + ]; + [ + "subkey"; + [ + "DataType"; + "String" + ] + ]; + [ + "value"; + [ + "DataType"; + "String" + ] + ] + ] + ] + } +}
\ No newline at end of file diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt new file mode 100644 index 0000000000..07af3b4647 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt @@ -0,0 +1,4 @@ +{"key"="075";"subkey"="2";"value"="abc"}; +{"key"="800";"subkey"="2";"value"="ddd"}; +{"key"="020";"subkey"="2";"value"="q"}; +{"key"="150";"subkey"="2";"value"="qzz"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt.attr new file mode 100644 index 0000000000..b6100e5fd0 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input2.txt.attr @@ -0,0 +1,30 @@ +{ + "_yql_row_spec" = { + "Type" = [ + "StructType"; + [ + [ + "key"; + [ + "DataType"; + "String" + ] + ]; + [ + "subkey"; + [ + "DataType"; + "String" + ] + ]; + [ + "value"; + [ + "DataType"; + "String" + ] + ] + ] + ] + } +}
\ No newline at end of file diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt new file mode 100644 index 0000000000..7a155c91b8 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt @@ -0,0 +1,4 @@ +{"key"="075";"subkey"="3";"value"="abc"}; +{"key"="800";"subkey"="3";"value"="ddd"}; +{"key"="020";"subkey"="3";"value"="q"}; +{"key"="150";"subkey"="3";"value"="qzz"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt.attr new file mode 100644 index 0000000000..b6100e5fd0 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/input3.txt.attr @@ -0,0 +1,30 @@ +{ + "_yql_row_spec" = { + "Type" = [ + "StructType"; + [ + [ + "key"; + [ + "DataType"; + "String" + ] + ]; + [ + "subkey"; + [ + "DataType"; + "String" + ] + ]; + [ + "value"; + [ + "DataType"; + "String" + ] + ] + ] + ] + } +}
\ No newline at end of file diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt new file mode 100644 index 0000000000..dd7dace4b5 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt @@ -0,0 +1,6 @@ +{"age"=30;"name"="bob"}; +{"age"=16;"name"="alice"}; +{"age"=55;"name"="jone"}; +{"age"=45;"name"="silver"}; +{"age"=45;"name"="smith"}; +{"age"=90;"name"="stive"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt.attr new file mode 100644 index 0000000000..984ced0f70 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1.txt.attr @@ -0,0 +1,3 @@ +{ + "_yql_row_spec"={"Type"=["StructType";[["age";["DataType";"Int64"]];["name";["DataType";"String"]]]]} +} diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt new file mode 100644 index 0000000000..dd7dace4b5 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt @@ -0,0 +1,6 @@ +{"age"=30;"name"="bob"}; +{"age"=16;"name"="alice"}; +{"age"=55;"name"="jone"}; +{"age"=45;"name"="silver"}; +{"age"=45;"name"="smith"}; +{"age"=90;"name"="stive"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt.attr new file mode 100644 index 0000000000..1ceba168e8 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input1_bad.txt.attr @@ -0,0 +1,3 @@ +{ + "_yql_row_spec"={"Type"=["StructType";[["age";["DataType";"Int32"]];["name";["DataType";"String"]]]]} +} diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt new file mode 100644 index 0000000000..72d5cb8767 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt @@ -0,0 +1,6 @@ +{"age"=30u;"name2"="bob"}; +{"age"=16u;"name2"="alice"}; +{"age"=55u;"name2"="jone"}; +{"age"=45u;"name2"="silver"}; +{"age"=45u;"name2"="smith"}; +{"age"=90u;"name2"="stive"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt.attr new file mode 100644 index 0000000000..f6fe260020 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2.txt.attr @@ -0,0 +1,3 @@ +{ + "_yql_row_spec"={"Type"=["StructType";[["age";["DataType";"Uint32"]];["name2";["DataType";"String"]]]]} +} diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt new file mode 100644 index 0000000000..72d5cb8767 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt @@ -0,0 +1,6 @@ +{"age"=30u;"name2"="bob"}; +{"age"=16u;"name2"="alice"}; +{"age"=55u;"name2"="jone"}; +{"age"=45u;"name2"="silver"}; +{"age"=45u;"name2"="smith"}; +{"age"=90u;"name2"="stive"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt.attr new file mode 100644 index 0000000000..e74a1cdc27 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input2_bad.txt.attr @@ -0,0 +1,3 @@ +{ + "_yql_row_spec"={"Type"=["StructType";[["age";["OptionalType";["DataType";"Uint32"]]];["name2";["DataType";"String"]]]]} +} diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt new file mode 100644 index 0000000000..dfe71abfe7 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt @@ -0,0 +1,6 @@ +{"age"=30;"name2"="bob"}; +{"age"=16;"name2"="alice"}; +{"age"=55;"name2"="jone"}; +{"age"=45;"name2"="silver"}; +{"age"=45;"name2"="smith"}; +{"age"=90;"name2"="stive"}; diff --git a/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt.attr new file mode 100644 index 0000000000..1c447d3475 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ManyInputTables/non_ksv_input3.txt.attr @@ -0,0 +1,10 @@ +{ + "schema" = < + "strict" = %false; + "unique_keys" = %false + > + [{ + "name" = "missing"; + "type" = "string" + }]; +} |