aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Epochs
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/Epochs
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/Epochs')
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.yql18
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.yql21
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.yql21
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.yql12
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.yql21
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/Bug2318.yql26
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.yql31
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.yql18
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.yql20
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/DropTable.yql45
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.yql18
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.yql26
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.yql27
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.yql18
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.yql21
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.yql12
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.yql21
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideType.yql52
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/OverrideWithSort.yql65
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/PredictSort.yql30
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.cfg4
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.yql46
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.cfg2
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.yql15
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql63
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/UseAndOverrideType.yql44
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/default.cfg3
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/input.txt4
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/input.txt.attr30
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/non_empty.txt4
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/non_empty.txt.attr30
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt4
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt.attr9
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt4
-rw-r--r--yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt.attr46
72 files changed, 1069 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.yql
new file mode 100644
index 0000000000..00d991912a
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendAfterOverride.yql
@@ -0,0 +1,18 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'renew))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.cfg
new file mode 100644
index 0000000000..48cd4555f7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output non_empty.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.yql
new file mode 100644
index 0000000000..65db044c0d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySorted.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.yql
new file mode 100644
index 0000000000..b51c4e8418
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedAfterCommit.yql
@@ -0,0 +1,21 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.cfg
new file mode 100644
index 0000000000..48cd4555f7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output non_empty.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.yql
new file mode 100644
index 0000000000..46099b0328
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDesc.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'false) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.yql
new file mode 100644
index 0000000000..587bc78b08
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedDescAfterCommit.yql
@@ -0,0 +1,21 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'false) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.yql
new file mode 100644
index 0000000000..e9a055f5d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendBySortedInSameCommit.yql
@@ -0,0 +1,19 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.cfg
new file mode 100644
index 0000000000..bffc8451cc
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output sorted.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.yql
new file mode 100644
index 0000000000..6b7ac4b175
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSorted.yql
@@ -0,0 +1,12 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.yql
new file mode 100644
index 0000000000..4aa7916884
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedAfterCommit.yql
@@ -0,0 +1,21 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.cfg
new file mode 100644
index 0000000000..bffc8451cc
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output sorted.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.yql
new file mode 100644
index 0000000000..65db044c0d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySorted.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.yql
new file mode 100644
index 0000000000..37fb7a1e86
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedBySortedAfterCommit.yql
@@ -0,0 +1,22 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.yql
new file mode 100644
index 0000000000..1b314c3f2e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/AppendToSortedInSameCommit.yql
@@ -0,0 +1,19 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/Bug2318.yql b/yql/essentials/tests/s-expressions/suites/Epochs/Bug2318.yql
new file mode 100644
index 0000000000..5734271142
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/Bug2318.yql
@@ -0,0 +1,26 @@
+#USE plato;
+#INSERT INTO Output WITH TRUNCATE SELECT key FROM Input;
+#COMMIT;
+#INSERT INTO Output WITH TRUNCATE SELECT key FROM CONCAT(Input, Output);
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let read (Read! world source (MrTableConcat (Key '('table (String '"Input")))) '('"key") '()))
+(let world (Left! read))
+(let input (Right! read))
+(let output (FlatMap input (lambda '(item) (AsList (AsStruct '('"key" (Member item '"key")))))))
+(let world (Write! world sink (Key '('table (String '"Output"))) output '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let read (Read! world source (MrTableConcat (Key '('table (String '"Input"))) (Key '('table (String '"Output")))) '('"key") '()))
+(let world (Left! read))
+(let input (Right! read))
+(let output (FlatMap input (lambda '(item) (AsList (AsStruct '('"key" (Member item '"key")))))))
+(let world (Write! world sink (Key '('table (String '"Output"))) output '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.cfg
new file mode 100644
index 0000000000..66737248b8
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.cfg
@@ -0,0 +1,2 @@
+in Input sorted.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.yql
new file mode 100644
index 0000000000..110b23d6ed
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.yql
@@ -0,0 +1,31 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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))
+
+(let r (Read! world source (Key '('table (String 'Output))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let filter (lambda '(item) (block '(
+ (let key (Member item '"key"))
+ (let res (Coalesce (> key (String '"020")) (Bool 'false)))
+ (return res)
+)
+)))
+
+(let out (Filter input filter))
+
+(let world (Write! world result (Key) out '('('type))))
+(let world (Commit! world sink))
+(let world (Commit! world result))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.yql b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.yql
new file mode 100644
index 0000000000..c834415dd1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppend.yql
@@ -0,0 +1,18 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.yql
new file mode 100644
index 0000000000..5803f92df9
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/DoubleAppendBySorted.yql
@@ -0,0 +1,20 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/DropTable.yql b/yql/essentials/tests/s-expressions/suites/Epochs/DropTable.yql
new file mode 100644
index 0000000000..ab423f96a3
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/DropTable.yql
@@ -0,0 +1,45 @@
+#USE plato;
+#INSERT INTO Output SELECT CAST(key as Int32) as item1, value as item2 FROM Input;
+#COMMIT;
+#DROP TABLE Output;
+#COMMIT;
+#INSERT INTO Output SELECT CAST(key as Int32) as item3, value as item4 FROM Input;
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let conv1 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"item1" (Cast (Member item '"key") 'Int32)))
+ (let res (AddMember res '"item2" (Member item '"value")))
+ (return (AsList res))
+))))
+
+(let conv2 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"item3" (Cast (Member item '"key") 'Int32)))
+ (let res (AddMember res '"item4" (Member item '"value")))
+ (return (AsList res))
+))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv1))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+(let world (Commit! world sink))
+
+(let world (Write! world sink (Key '('table (String 'Output))) (Void) '('('mode 'drop))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv2))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.cfg
new file mode 100644
index 0000000000..a26fadcaa7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.cfg
@@ -0,0 +1,3 @@
+xfail
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.yql b/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.yql
new file mode 100644
index 0000000000..513c160992
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDoubleOverride.yql
@@ -0,0 +1,18 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'renew))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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/Epochs/FailDropAndModify1.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.cfg
new file mode 100644
index 0000000000..a26fadcaa7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.cfg
@@ -0,0 +1,3 @@
+xfail
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.yql b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.yql
new file mode 100644
index 0000000000..27a8f34398
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify1.yql
@@ -0,0 +1,26 @@
+#USE plato;
+#DROP TABLE Output;
+#INSERT INTO Output SELECT key FROM Input;
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let conv (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"key" (Member item '"key")))
+ (return (AsList res))
+))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) (Void) '('('mode 'drop))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.cfg
new file mode 100644
index 0000000000..a26fadcaa7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.cfg
@@ -0,0 +1,3 @@
+xfail
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.yql b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.yql
new file mode 100644
index 0000000000..914cff8c91
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailDropAndModify2.yql
@@ -0,0 +1,27 @@
+#USE plato;
+#INSERT INTO Output SELECT key FROM Input;
+#DROP TABLE Output;
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let conv (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"key" (Member item '"key")))
+ (return (AsList res))
+))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) (Void) '('('mode 'drop))))
+
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.cfg
new file mode 100644
index 0000000000..a26fadcaa7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.cfg
@@ -0,0 +1,3 @@
+xfail
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.yql b/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.yql
new file mode 100644
index 0000000000..f2047207e7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/FailMixedAppendOverride.yql
@@ -0,0 +1,18 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'append))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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/Epochs/OverrideBySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.cfg
new file mode 100644
index 0000000000..48cd4555f7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output non_empty.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.yql
new file mode 100644
index 0000000000..f27a896172
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySorted.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.yql
new file mode 100644
index 0000000000..c08723a840
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideBySortedAfterCommit.yql
@@ -0,0 +1,21 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.cfg
new file mode 100644
index 0000000000..bffc8451cc
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output sorted.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.yql
new file mode 100644
index 0000000000..383a70fad1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSorted.yql
@@ -0,0 +1,12 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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/Epochs/OverrideSortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.yql
new file mode 100644
index 0000000000..a29f76402f
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedAfterCommit.yql
@@ -0,0 +1,21 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (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/Epochs/OverrideSortedBySortedDesc.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.cfg
new file mode 100644
index 0000000000..bffc8451cc
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output sorted.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.yql
new file mode 100644
index 0000000000..b43deb2cd9
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDesc.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'false) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.yql
new file mode 100644
index 0000000000..71c6b7ef4f
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedBySortedDescAfterCommit.yql
@@ -0,0 +1,22 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'false) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.cfg
new file mode 100644
index 0000000000..50b4461ad2
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output sorted_desc.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.yql
new file mode 100644
index 0000000000..f27a896172
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySorted.yql
@@ -0,0 +1,13 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.cfg
new file mode 100644
index 0000000000..ad52c79527
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+out Output output.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.yql
new file mode 100644
index 0000000000..643a22242b
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideSortedDescBySortedAfterCommit.yql
@@ -0,0 +1,22 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'false) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideType.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideType.yql
new file mode 100644
index 0000000000..f9b513d556
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideType.yql
@@ -0,0 +1,52 @@
+#USE plato;
+#INSERT INTO Output SELECT CAST(key as Int32) as item1, value as item2 FROM Input;
+#COMMIT;
+#INSERT INTO Output SELECT CAST(key as Int32) as item1, value as item2 FROM Input;
+#COMMIT;
+#INSERT INTO Output WITH TRUNCATE SELECT CAST(key as Int32) as item3, value as item4 FROM Input;
+
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let conv1 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"item1" (Cast (Member item '"key") 'Int32)))
+ (let res (AddMember res '"item2" (Member item '"value")))
+ (return (AsList res))
+))))
+
+(let conv2 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"item3" (Cast (Member item '"key") 'Int32)))
+ (let res (AddMember res '"item4" (Member item '"value")))
+ (return (AsList res))
+))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv1))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv1))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv2))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'renew))))
+
+(let world (Commit! world sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/OverrideWithSort.yql b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideWithSort.yql
new file mode 100644
index 0000000000..946c9f2d68
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/OverrideWithSort.yql
@@ -0,0 +1,65 @@
+#USE plato;
+#INSERT INTO Output SELECT COALESCE(CAST(key as Uint64), 0) as age1, value as name1 FROM Input ORDER by age1;
+#COMMIT;
+#INSERT INTO Output WITH TRUNCATE SELECT age1 as age2, name1 as name2 FROM Output WHERE age1 < 100 ORDER BY name2;
+#COMMIT;
+#SELECT * FROM Output where name2 < "zzz";
+
+
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let conv1 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"age1" (Coalesce (Cast (Member item '"key") 'Uint64) (Uint64 '0))))
+ (let res (AddMember res '"name1" (Member item '"value")))
+ (return (AsList res))
+))))
+(let out (FlatMap input conv1))
+(let out (Sort out (Bool 'true) (lambda '(item) (Member item '"age1"))))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'append))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Output"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let filter (lambda '(item) (block '(
+ (let age (Member item '"age1"))
+ (let res (Coalesce (< age (Uint64 '100)) (Bool 'false)))
+ (return res)
+)
+)))
+(let out (Filter input filter))
+(let conv2 (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"age2" (Member item '"age1")))
+ (let res (AddMember res '"name2" (Member item '"name1")))
+ (return (AsList res))
+))))
+(let out (FlatMap out conv2))
+(let out (Sort out (Bool 'true) (lambda '(item) (Member item '"name2"))))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Output"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let filter (lambda '(item) (block '(
+ (let name (Member item '"name2"))
+ (let res (Coalesce (< name (String '"zzz")) (Bool 'false)))
+ (return res)
+)
+)))
+(let out (Filter input filter))
+
+(let world (Write! world result (Key) out '('('type))))
+(let world (Commit! world sink))
+(let world (Commit! world result))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/PredictSort.yql b/yql/essentials/tests/s-expressions/suites/Epochs/PredictSort.yql
new file mode 100644
index 0000000000..b3f57179c3
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/PredictSort.yql
@@ -0,0 +1,30 @@
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
+(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Output"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let filter (lambda '(item) (block '(
+ (let key (Member item '"key"))
+ (let res (Coalesce (< key (String '"100")) (Bool 'false)))
+ (return res)
+)
+)))
+
+(let out (Filter input filter))
+
+(let world (Write! world result (Key) out '('('type))))
+(let world (Commit! world sink))
+(let world (Commit! world result))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.cfg
new file mode 100644
index 0000000000..d611f0155e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.cfg
@@ -0,0 +1,4 @@
+in Input input.txt
+out Output output.txt
+out Output2 output2.txt
+res result.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.yql b/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.yql
new file mode 100644
index 0000000000..f2266e36a6
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReadFromGrandCommit.yql
@@ -0,0 +1,46 @@
+#USE plato;
+#INSERT INTO Output WITH TRUNCATE SELECT key as a, "value:" || value as b FROM Input;
+#COMMIT;
+#INSERT INTO Output2 WITH TRUNCATE SELECT 1 as x;
+#COMMIT;
+#SELECT * FROM Output;
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let conv (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"a" (Member item '"key")))
+ (let res (AddMember res '"b" (Concat (String '"value:") (Member item '"value"))))
+ (return (AsList res))
+))))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+(let out (FlatMap input conv))
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let fill (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"x" (Int64 '"1")))
+ (return (AsList res))
+))))
+
+(let out2 (FlatMap (AsList (Void)) fill))
+(let world (Write! world sink (Key '('table (String 'Output2))) out2 '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String '"Output"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let world (Write! world result (Key) input '('('type) '('autoref))))
+(let world (Commit! world result))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.cfg
new file mode 100644
index 0000000000..6f99339756
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.cfg
@@ -0,0 +1,2 @@
+in Input input.txt
+res result.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.yql b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.yql
new file mode 100644
index 0000000000..ecb64cf46c
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmaBeforeTableScheme.yql
@@ -0,0 +1,15 @@
+(
+(let mr_source (DataSource 'yt 'plato))
+(let world (Configure! world (DataSource 'yt '$all) 'Attr 'externaltx '"0-0-0-0"))
+(let x (Read! world mr_source
+ (Key '('tablescheme (String '"Input")))
+ (Void) '(
+ '('do_not_fail_on_invalid_schema)
+ '('infer_scheme)
+ )
+))
+(let scheme (Right! x))
+(let res_sink (DataSink 'result))
+(let world (Write! world res_sink (Key) scheme '()))
+(return (Commit! world res_sink))
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql
new file mode 100644
index 0000000000..f3c7e35b7d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql
@@ -0,0 +1,63 @@
+#USE plato;
+#PRAGMA yt.InferSchema = "1";
+#PRAGMA yt.MaxRowWeight = "128m";
+#INSERT INTO Output
+#select * from Input
+#WHERE key != "0";
+#commit;
+#PRAGMA yt.InferSchema = "3";
+#select * from Input;
+#PRAGMA yt.MaxRowWeight = "128m";
+#PRAGMA yt.InferSchema = "1";
+#select * from Input
+#WHERE key != "0";
+
+(
+(let source (DataSource 'yt 'plato))
+(let source_any (DataSource 'yt '"$all"))
+(let sink (DataSink 'yt 'plato))
+(let result (DataSink 'result))
+
+(let world (Configure! world source_any '"Attr" '"inferschema" '"1"))
+(let world (Configure! world source_any '"Attr" '"maxrowweight" '"128m"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let input (Right! r))
+(let world (Left! r))
+
+(let filter (lambda '(item) (block '(
+ (let key (Member item '"key"))
+ (let res (Coalesce (!= key (String '"0")) (Bool 'false)))
+ (return res)
+))))
+
+(let out (Filter input filter))
+
+(let world (Write! world sink (Key '('table (String '"Output"))) out '('('mode 'append))))
+(let world (Commit! world sink))
+
+(let world (Configure! world source_any '"Attr" '"inferschema" '"3"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let input (Right! r))
+(let world (Left! r))
+
+(let world (Write! world result (Key) input '('('type) '('autoref))))
+(let world (Commit! world result))
+
+(let world (Configure! world source_any '"Attr" '"maxrowweight" '"128m"))
+(let world (Configure! world source_any '"Attr" '"inferschema" '"1"))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let input (Right! r))
+(let world (Left! r))
+
+(let out (Filter input filter))
+
+(let world (Write! world result (Key) out '('('type) '('autoref))))
+
+(let world (Commit! world result))
+(let world (Commit! world sink))
+
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/UseAndOverrideType.yql b/yql/essentials/tests/s-expressions/suites/Epochs/UseAndOverrideType.yql
new file mode 100644
index 0000000000..7980440ada
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/UseAndOverrideType.yql
@@ -0,0 +1,44 @@
+#USE plato;
+#INSERT INTO Output SELECT CAST(key as Int32) as item1, value as item2 FROM Input;
+#COMMIT;
+#INSERT INTO Output WITH TRUNCATE SELECT COALESCE(CAST(item1 as String), "") as key, "." as subkey, item2 as value FROM Output;
+
+(
+(let source (DataSource '"yt" '"plato"))
+(let sink (DataSink '"yt" '"plato"))
+(let result (DataSink 'result))
+
+(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
+(let world (Left! r))
+(let input (Right! r))
+
+(let conv (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"item1" (Cast (Member item '"key") 'Int32)))
+ (let res (AddMember res '"item2" (Member item '"value")))
+ (return (AsList res))
+))))
+(let out (FlatMap input conv))
+
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'renew))))
+(let world (Commit! world sink))
+
+(let r (Read! world source (Key '('table (String 'Output))) (Void) '()))
+(let world (Left! r))
+(let out (Right! r))
+
+(let conv (lambda '(item) (block '(
+ (let res (Struct))
+ (let res (AddMember res '"key" (Coalesce (Cast (Member item '"item1") 'String) (String '""))))
+ (let res (AddMember res '"subkey" (String '".")))
+ (let res (AddMember res '"value" (Member item '"item2")))
+ (return (AsList res))
+
+))))
+(let out (FlatMap out conv))
+
+(let world (Write! world sink (Key '('table (String 'Output))) out '('('mode 'renew))))
+(let world (Commit! world sink))
+(let world (Commit! world result))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/default.cfg b/yql/essentials/tests/s-expressions/suites/Epochs/default.cfg
new file mode 100644
index 0000000000..fe2b19a9ff
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/default.cfg
@@ -0,0 +1,3 @@
+in Input input.txt
+out Output output.txt
+res result.txt
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/input.txt b/yql/essentials/tests/s-expressions/suites/Epochs/input.txt
new file mode 100644
index 0000000000..65949ea745
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/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/Epochs/input.txt.attr b/yql/essentials/tests/s-expressions/suites/Epochs/input.txt.attr
new file mode 100644
index 0000000000..b6100e5fd0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/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/Epochs/non_empty.txt b/yql/essentials/tests/s-expressions/suites/Epochs/non_empty.txt
new file mode 100644
index 0000000000..65949ea745
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/non_empty.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/Epochs/non_empty.txt.attr b/yql/essentials/tests/s-expressions/suites/Epochs/non_empty.txt.attr
new file mode 100644
index 0000000000..b6100e5fd0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/non_empty.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/Epochs/sorted.txt b/yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt
new file mode 100644
index 0000000000..dd47b9a25e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt
@@ -0,0 +1,4 @@
+{"key"="023";"subkey"="3";"value"="aaa"};
+{"key"="037";"subkey"="5";"value"="ddd"};
+{"key"="075";"subkey"="1";"value"="abc"};
+{"key"="150";"subkey"="8";"value"="zzz"};
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt.attr b/yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt.attr
new file mode 100644
index 0000000000..16aab8884b
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/sorted.txt.attr
@@ -0,0 +1,9 @@
+{
+ "_yql_row_spec"={
+ "SortMembers"=["key"];
+ "SortedBy"=["key"];
+ "SortDirections"=[1];
+ "SortedByTypes"=[["DataType";"String"]];
+ "Type"=["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]
+ }
+}
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt b/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt
new file mode 100644
index 0000000000..ac8e34386d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt
@@ -0,0 +1,4 @@
+{"_yql_column_0"="\xE0\xC7\xCF\xCF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xFC";"key"="800";"subkey"="2";"value"="ddd"};
+{"_yql_column_0"="\xE0\xCE\xCA\xCF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xFC";"key"="150";"subkey"="4";"value"="qzz"};
+{"_yql_column_0"="\xE0\xCF\xC8\xCA\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xFC";"key"="075";"subkey"="1";"value"="abc"};
+{"_yql_column_0"="\xE0\xCF\xCD\xCF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFE\xFC";"key"="020";"subkey"="3";"value"="q"};
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt.attr b/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt.attr
new file mode 100644
index 0000000000..903b4c7d93
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/Epochs/sorted_desc.txt.attr
@@ -0,0 +1,46 @@
+{
+ "_yql_row_spec" = {
+ "SortMembers" = [
+ "key"
+ ];
+ "SortDirections" = [
+ 0
+ ];
+ "UniqueKeys" = %false;
+ "Type" = [
+ "StructType";
+ [
+ [
+ "key";
+ [
+ "DataType";
+ "String"
+ ]
+ ];
+ [
+ "subkey";
+ [
+ "DataType";
+ "String"
+ ]
+ ];
+ [
+ "value";
+ [
+ "DataType";
+ "String"
+ ]
+ ]
+ ]
+ ];
+ "SortedByTypes" = [
+ [
+ "DataType";
+ "String"
+ ]
+ ];
+ "SortedBy" = [
+ "_yql_column_0"
+ ]
+ }
+} \ No newline at end of file