aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Dynamic
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/s-expressions/suites/Dynamic
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-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/Dynamic')
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/Copy.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/Limit.yql15
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/TablePull.yql16
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/TableScheme.yql16
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/default.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt7
-rw-r--r--yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt.attr33
7 files changed, 103 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/Copy.yql b/yql/essentials/tests/s-expressions/suites/Dynamic/Copy.yql
new file mode 100644
index 0000000000..9b7882d255
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/Copy.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input1"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/Limit.yql b/yql/essentials/tests/s-expressions/suites/Dynamic/Limit.yql
new file mode 100644
index 0000000000..c7190c8f88
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/Limit.yql
@@ -0,0 +1,15 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input1"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let input (Take input (Int32 '"3")))
+
+(let res_sink (DataSink 'result))
+(let world (Write! world res_sink (Key) (Unordered input) '('('type))))
+(let world (Commit! world res_sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/TablePull.yql b/yql/essentials/tests/s-expressions/suites/Dynamic/TablePull.yql
new file mode 100644
index 0000000000..4ba424cb1e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/TablePull.yql
@@ -0,0 +1,16 @@
+(
+(let mr_source (DataSource 'yt 'plato))
+
+(let x (Read! world mr_source
+ (Key '('table (String 'Input1)))
+ (Void) '()
+))
+
+(let world (Left! x))
+(let data (Right! x))
+
+(let res_sink (DataSink 'result))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/TableScheme.yql b/yql/essentials/tests/s-expressions/suites/Dynamic/TableScheme.yql
new file mode 100644
index 0000000000..b10df583ba
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/TableScheme.yql
@@ -0,0 +1,16 @@
+(
+(let mr_source (DataSource 'yt 'plato))
+
+(let x (Read! world mr_source
+ (Key '('tablescheme (String 'Input1)))
+ (Void) '()
+))
+
+(let world (Left! x))
+(let scheme (Right! x))
+
+(let res_sink (DataSink 'result))
+(let world (Write! world res_sink (Key) scheme '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/default.cfg b/yql/essentials/tests/s-expressions/suites/Dynamic/default.cfg
new file mode 100644
index 0000000000..64df516e6f
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/default.cfg
@@ -0,0 +1,3 @@
+in Input1 input1.txt
+out Output output.txt
+res result.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt b/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt
new file mode 100644
index 0000000000..c2f900fd7c
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt
@@ -0,0 +1,7 @@
+{"key"="020";"subkey"="1";"value"="q"};
+{"key"="075";"subkey"="2";"value"="abc"};
+{"key"="075";"subkey"="3";"value"="abc"};
+{"key"="075";"subkey"="4";"value"="abc"};
+{"key"="075";"subkey"="5";"value"="abc"};
+{"key"="150";"subkey"="6";"value"="qzz"};
+{"key"="800";"subkey"="7";"value"="ddd"};
diff --git a/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt.attr b/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt.attr
new file mode 100644
index 0000000000..9e3c33c4cb
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Dynamic/input1.txt.attr
@@ -0,0 +1,33 @@
+{
+ "_yql_row_spec"={
+ "Type"=["StructType";[
+ ["key"; ["DataType"; "String"]];
+ ["subkey"; ["DataType"; "String"]];
+ ["value"; ["DataType"; "String"]];
+ ]];
+ "SortMembers"=["key"; "subkey"];
+ "SortedBy"=["key"; "subkey"];
+ "SortDirections"=[1; 1];
+ "SortedByTypes"=[["DataType";"String"]; ["DataType";"String"]]
+ };
+ "_yql_dynamic"=%true;
+ "schema"=<
+ "strict" = %true;
+ "unique_keys" = %true
+ >[
+ {
+ "name" = "key";
+ "type" = "string";
+ "sort_order" = "ascending";
+ };
+ {
+ "name" = "subkey";
+ "type" = "string";
+ "sort_order" = "ascending";
+ };
+ {
+ "name" = "value";
+ "type" = "string";
+ };
+ ]
+} \ No newline at end of file