aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions
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/ManyYamrTransactions
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/ManyYamrTransactions')
-rw-r--r--yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/default.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt4
-rw-r--r--yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt.attr30
-rw-r--r--yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.yql24
5 files changed, 63 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/default.cfg b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/default.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/default.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt
new file mode 100644
index 0000000000..65949ea745
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt
@@ -0,0 +1,4 @@
+{"key"="075";"subkey"="1";"value"="abc"};
+{"key"="800";"subkey"="2";"value"="ddd"};
+{"key"="020";"subkey"="3";"value"="q"};
+{"key"="150";"subkey"="4";"value"="qzz"};
diff --git a/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt.attr b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.txt.attr
new file mode 100644
index 0000000000..b6100e5fd0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/input.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/ManyYamrTransactions/program1.cfg b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.cfg
new file mode 100644
index 0000000000..5baea08e78
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.cfg
@@ -0,0 +1,3 @@
+in Input input.txt
+out Output output.txt
+out Output2 output2.txt
diff --git a/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.yql b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.yql
new file mode 100644
index 0000000000..8ebe956e7c
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ManyYamrTransactions/program1.yql
@@ -0,0 +1,24 @@
+(
+#comment
+(let mr_source (DataSource 'yt 'plato))
+(let x (Read! world mr_source (Key '('table (String 'Input))) '('key 'subkey 'value) '()))
+(let world (Left! x))
+(let table1 (Right! x))
+(let tresh (Int32 'x"64000000"))
+(let table1low (FlatMap table1 (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))) table1low '('('mode 'append))))
+(let world (Commit! world mr_sink))
+(let x (Read! world mr_source (Key '('table (String 'Output))) '('key 'subkey 'value) '()))
+(let world (Left! x))
+(let table2 (Right! x))
+(let world (Write! world mr_sink (Key '('table (String 'Output2))) table2 '('('mode 'append))))
+(let world (Commit! world mr_sink))
+(return world)
+)